disable debug assertions in the standard library
This commit is contained in:
parent
c7c77b149b
commit
1044099c19
3 changed files with 2 additions and 3 deletions
|
|
@ -353,6 +353,8 @@ path = "lib.rs"
|
|||
// to the sysroot either.
|
||||
command.env_remove("RUSTC_WRAPPER");
|
||||
command.env_remove("RUSTFLAGS");
|
||||
// Disable debug assertions in the standard library -- Miri is already slow enough.
|
||||
command.env("RUSTFLAGS", "-Cdebug-assertions=off");
|
||||
// Finally run it!
|
||||
if command.status().expect("failed to run xargo").success().not() {
|
||||
show_error(format!("failed to run xargo"));
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@ fn main() {
|
|||
// Assertion and debug assertion
|
||||
test(None, |_old_val| { assert!(false); loop {} });
|
||||
test(None, |_old_val| { debug_assert!(false); loop {} });
|
||||
test(None, |_old_val| { unsafe { std::char::from_u32_unchecked(0xFD10000); } loop {} }); // trigger debug-assertion in libstd
|
||||
|
||||
eprintln!("Success!"); // Make sure we get this in stderr
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,4 @@ thread 'main' panicked at 'assertion failed: false', $DIR/catch_panic.rs:LL:29
|
|||
Caught panic message (&str): assertion failed: false
|
||||
thread 'main' panicked at 'assertion failed: false', $DIR/catch_panic.rs:LL:29
|
||||
Caught panic message (&str): assertion failed: false
|
||||
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', $LOC
|
||||
Caught panic message (&str): called `Option::unwrap()` on a `None` value
|
||||
Success!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue