From 8d25d6b2c9bb04c9f0d222ed6b900f696c0e7ebe Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 23 Jul 2022 20:37:59 -0700 Subject: [PATCH] Disable backtrace test on miri Starting in the most recent release of miri, the build.rs probe fails to build even on nightly toolchain with one of the following errors: error: miri can only run programs that have a main function error: the current sysroot was built without `-Zalways-encode-mir`, or libcore seems missing. Use `cargo miri setup` to prepare a sysroot that is suitable for Miri. which causes anyhow::Error's backtrace() inherent method to not exist. error[E0658]: use of unstable library feature 'backtrace' --> tests/test_backtrace.rs:20:19 | 20 | let _ = error.backtrace(); | ^^^^^^^^^ | = note: see issue 53487 for more information = help: add `#![feature(backtrace)]` to the crate attributes to enable --- tests/test_backtrace.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_backtrace.rs b/tests/test_backtrace.rs index ce385f5..bffa7a5 100644 --- a/tests/test_backtrace.rs +++ b/tests/test_backtrace.rs @@ -1,3 +1,5 @@ +#![cfg(not(miri))] + #[rustversion::not(nightly)] #[ignore] #[test]