mirror of
https://github.com/clap-rs/clap
synced 2025-01-05 17:28:42 +00:00
Forbid all unsafe code.
This commit is contained in:
parent
8454136126
commit
96b7fd454b
3 changed files with 4 additions and 0 deletions
|
@ -16,6 +16,8 @@
|
||||||
//! directly. See [clap documentation](https://docs.rs/clap)
|
//! directly. See [clap documentation](https://docs.rs/clap)
|
||||||
//! for the usage of `#[derive(Clap)]`.
|
//! for the usage of `#[derive(Clap)]`.
|
||||||
|
|
||||||
|
#![forbid(unsafe_code)]
|
||||||
|
|
||||||
extern crate proc_macro;
|
extern crate proc_macro;
|
||||||
|
|
||||||
use proc_macro::TokenStream;
|
use proc_macro::TokenStream;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
unused_allocation,
|
unused_allocation,
|
||||||
trivial_numeric_casts
|
trivial_numeric_casts
|
||||||
)]
|
)]
|
||||||
|
#![forbid(unsafe_code)]
|
||||||
#![allow(clippy::needless_doctest_main)]
|
#![allow(clippy::needless_doctest_main)]
|
||||||
|
|
||||||
const INTERNAL_ERROR_MSG: &str = "Fatal internal error. Please consider filing a bug \
|
const INTERNAL_ERROR_MSG: &str = "Fatal internal error. Please consider filing a bug \
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
unused_allocation,
|
unused_allocation,
|
||||||
trivial_numeric_casts
|
trivial_numeric_casts
|
||||||
)]
|
)]
|
||||||
|
#![forbid(unsafe_code)]
|
||||||
|
|
||||||
#[cfg(not(feature = "std"))]
|
#[cfg(not(feature = "std"))]
|
||||||
compile_error!("`std` feature is currently required to build `clap`");
|
compile_error!("`std` feature is currently required to build `clap`");
|
||||||
|
|
Loading…
Reference in a new issue