Skip to content

Commit 606e269

Browse files
authored
Rollup merge of rust-lang#45739 - rkarp:master, r=petrochenkov
Fix libstd compile error for windows-gnu targets without `backtrace` This is basically an addition to rust-lang#44979. Compiling `libstd` still fails when targeting `windows-gnu` with `panic = "abort"` because the items in the `...c::gnu` module are not used. They are only referenced from `backtrace_gnu.rs`, which is indirectly feature gated behind `backtrace` [here](https://github.com/rust-lang/rust/blob/9f3b09116b742b2606dc5f36f9145e0c89e4010b/src/libstd/sys/windows/mod.rs#L23).
2 parents 7a766a4 + ce3f071 commit 606e269

File tree

1 file changed

+2
-2
lines changed
  • src/libstd/sys/windows

1 file changed

+2
-2
lines changed

src/libstd/sys/windows/c.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ compat_fn! {
12281228
}
12291229
}
12301230

1231-
#[cfg(target_env = "gnu")]
1231+
#[cfg(all(target_env = "gnu", feature = "backtrace"))]
12321232
mod gnu {
12331233
use super::*;
12341234

@@ -1256,5 +1256,5 @@ mod gnu {
12561256
}
12571257
}
12581258

1259-
#[cfg(target_env = "gnu")]
1259+
#[cfg(all(target_env = "gnu", feature = "backtrace"))]
12601260
pub use self::gnu::*;

0 commit comments

Comments
 (0)