mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
fix(build-rs)!: Remove meaningless 'cargo_cfg_debug_assertions'
The documentation that was added was pulled straight from a comment in `custom_build.rs`.
This commit is contained in:
parent
70a6f011a4
commit
71f68dc3c3
@ -10,7 +10,6 @@ fn smoke_test_inputs() {
|
|||||||
use build_rs::input::*;
|
use build_rs::input::*;
|
||||||
dbg!(cargo());
|
dbg!(cargo());
|
||||||
dbg!(cargo_cfg("careful"));
|
dbg!(cargo_cfg("careful"));
|
||||||
dbg!(cargo_cfg_debug_assertions());
|
|
||||||
#[cfg(feature = "unstable")]
|
#[cfg(feature = "unstable")]
|
||||||
dbg!(cargo_cfg_fmt_debug());
|
dbg!(cargo_cfg_fmt_debug());
|
||||||
#[cfg(feature = "unstable")]
|
#[cfg(feature = "unstable")]
|
||||||
|
@ -109,6 +109,11 @@ mod cfg {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// If we are compiling with debug assertions enabled.
|
/// If we are compiling with debug assertions enabled.
|
||||||
|
///
|
||||||
|
/// Build scripts are not passed this cfg because
|
||||||
|
/// this cfg is always true and misleading.
|
||||||
|
/// That is because Cargo queries rustc without any profile settings.
|
||||||
|
#[cfg(any())]
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn cargo_cfg_debug_assertions() -> bool {
|
pub fn cargo_cfg_debug_assertions() -> bool {
|
||||||
is_present("CARGO_CFG_DEBUG_ASSERTIONS")
|
is_present("CARGO_CFG_DEBUG_ASSERTIONS")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user