]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mir/mir_temp_promotions.rs
Auto merge of #84589 - In-line:zircon-thread-name, r=JohnTitor
[rust.git] / src / test / ui / mir / mir_temp_promotions.rs
1 // run-pass
2 fn test1(f: f32) -> bool {
3     // test that we properly promote temporaries to allocas when a temporary is assigned to
4     // multiple times (assignment is still happening once ∀ possible dataflows).
5     !(f.is_nan() || f.is_infinite())
6 }
7
8 fn main() {
9     assert_eq!(test1(0.0), true);
10 }