rust/tests/coverage/inline-dead.rs
Zalathar 99797bbd9f coverage: Format all remaining tests
These tests can simply be reformatted as normal, because the resulting changes
are unimportant.
2024-01-18 10:42:37 +11:00

26 lines
356 B
Rust

// Regression test for issue #98833.
// compile-flags: -Zinline-mir -Cdebug-assertions=off
fn main() {
println!("{}", live::<false>());
let f = |x: bool| {
debug_assert!(x);
};
f(false);
}
#[inline]
fn live<const B: bool>() -> u32 {
if B {
dead()
} else {
0
}
}
#[inline]
fn dead() -> u32 {
42
}