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
master
Sergey "Shnatsel" Davidoff 2019-09-30 16:57:16 +02:00 committed by Alex Crichton
parent 7c9b0a39db
commit 41dd8e6741
1 changed files with 5 additions and 0 deletions

View File

@ -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;