diff --git a/build.rs b/build.rs index de94535..8456a7d 100644 --- a/build.rs +++ b/build.rs @@ -68,6 +68,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");