diff --git a/build.rs b/build.rs index 4862b0c..f1e734d 100644 --- a/build.rs +++ b/build.rs @@ -43,6 +43,14 @@ fn main() { } fn compile_probe() -> Option { + if env::var_os("RUSTC_STAGE").is_some() { + // We are running inside rustc bootstrap. This is a highly non-standard environment with + // issues such as and + // . Let's just not use nightly features + // here. + return None; + } + let rustc = env::var_os("RUSTC")?; let out_dir = env::var_os("OUT_DIR")?; let probefile = Path::new(&out_dir).join("probe.rs");