about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2017-11-04 13:49:33 +0800
committerGitHub <noreply@github.com>2017-11-04 13:49:33 +0800
commit606e269e14b25e4d9ba97301460e2899ded969de (patch)
tree17d8dce688d38ae32c83395310602b976fb335e3 /src/libstd/sys
parent7a766a4a4150ace21c46afcc06df2b508fa06008 (diff)
parentce3f0719e6a19fce9fee7c361eb04a805730a668 (diff)
downloadrust-606e269e14b25e4d9ba97301460e2899ded969de.tar.gz
rust-606e269e14b25e4d9ba97301460e2899ded969de.zip
Rollup merge of #45739 - rkarp:master, r=petrochenkov
Fix libstd compile error for windows-gnu targets without `backtrace`

This is basically an addition to #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).
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/windows/c.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 39e00270233..6e0cccff001 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -1228,7 +1228,7 @@ compat_fn! {
     }
 }
 
-#[cfg(target_env = "gnu")]
+#[cfg(all(target_env = "gnu", feature = "backtrace"))]
 mod gnu {
     use super::*;
 
@@ -1256,5 +1256,5 @@ mod gnu {
     }
 }
 
-#[cfg(target_env = "gnu")]
+#[cfg(all(target_env = "gnu", feature = "backtrace"))]
 pub use self::gnu::*;