Skip to content

Commit

Permalink
Disable backtrace test on miri
Browse files Browse the repository at this point in the history
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 <rust-lang/rust#53487> for more information
       = help: add `#![feature(backtrace)]` to the crate attributes to enable
  • Loading branch information
dtolnay committed Jul 24, 2022
1 parent ffb25df commit 8d25d6b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_backtrace.rs
@@ -1,3 +1,5 @@
#![cfg(not(miri))]

#[rustversion::not(nightly)]
#[ignore]
#[test]
Expand Down

0 comments on commit 8d25d6b

Please sign in to comment.