Skip to content

Commit 6714b7f

Browse files
committed
fix(build-rs)!: Remove meaningless 'cargo_cfg_debug_assertions'
The documentation that was added was pulled straight from a comment in `custom_build.rs`.
1 parent a4a3651 commit 6714b7f

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ anstyle = "1.0.8"
2424
anyhow = "1.0.86"
2525
base64 = "0.22.1"
2626
blake3 = "1.5.2"
27-
build-rs = { version = "0.2.0", path = "crates/build-rs" }
27+
build-rs = { version = "0.3.0", path = "crates/build-rs" }
2828
bytesize = "1.3"
2929
cargo = { path = "" }
3030
cargo-credential = { version = "0.4.2", path = "credential/cargo-credential" }

crates/build-rs-test-lib/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ fn smoke_test_inputs() {
1010
use build_rs::input::*;
1111
dbg!(cargo());
1212
dbg!(cargo_cfg("careful"));
13-
dbg!(cargo_cfg_debug_assertions());
1413
#[cfg(feature = "unstable")]
1514
dbg!(cargo_cfg_fmt_debug());
1615
#[cfg(feature = "unstable")]

crates/build-rs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "build-rs"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
rust-version.workspace = true
55
edition.workspace = true
66
license.workspace = true

crates/build-rs/src/input.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ mod cfg {
109109
}
110110

111111
/// If we are compiling with debug assertions enabled.
112+
///
113+
/// This cfg is always true and misleading, so avoid setting it.
114+
/// That is because Cargo queries rustc without any profile settings.
115+
#[cfg(any())]
112116
#[track_caller]
113117
pub fn cargo_cfg_debug_assertions() -> bool {
114118
is_present("CARGO_CFG_DEBUG_ASSERTIONS")

0 commit comments

Comments
 (0)