]> git.lizzy.rs Git - rust.git/commitdiff
better optimization suppression
authorRalf Jung <post@ralfj.de>
Mon, 7 Sep 2020 09:16:16 +0000 (11:16 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Sep 2020 09:16:16 +0000 (11:16 +0200)
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
tests/compile-fail/invalid_bool.rs

index 933ee91c7d4d46ca4b0bc87c8a54e8f50b1fafcc..8d8cce1c7e50e045c6801141cbb87f015ab7987c 100644 (file)
@@ -2,6 +2,7 @@
 // Make sure we find these even with many checks disabled.
 // compile-flags: -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation
 
+#[inline(never)]
 fn dont_optimize<T>(x: T) -> T { x }
 
 fn main() {