aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey "Shnatsel" Davidoff <shnatsel@gmail.com>2019-09-30 16:57:16 +0200
committerAlex Crichton <alex@alexcrichton.com>2019-09-30 09:57:16 -0500
commit41dd8e674144f208d36790a781011f9ea63e20f1 (patch)
treea8c2fb38229d40576a921909c55ef67a6a71a099 /src
parent7c9b0a39db0c4c235db372f88d725fae6e82889f (diff)
downloadmilf-rs-41dd8e674144f208d36790a781011f9ea63e20f1.tar.gz
milf-rs-41dd8e674144f208d36790a781011f9ea63e20f1.zip
Forbid unsafe code (#332)
* Forbid unsafe code * Add badge advertising that unsafe code is forbidden * Revert "Add badge advertising that unsafe code is forbidden" This reverts commit e8d35d20d016a341d37969b975463588d3143528. * Comment on #![forbid(unsafe_code)] * Run rustfmt
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index fb04984..4a32d71 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -147,6 +147,11 @@
#![doc(html_root_url = "https://docs.rs/toml/0.5")]
#![deny(missing_docs)]
#![warn(rust_2018_idioms)]
+// Makes rustc abort compilation if there are any unsafe blocks in the crate.
+// Presence of this annotation is picked up by tools such as cargo-geiger
+// and lets them ensure that there is indeed no unsafe code as opposed to
+// something they couldn't detect (e.g. unsafe added via macro expansion, etc).
+#![forbid(unsafe_code)]
pub mod map;
pub mod value;