mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
11 lines
302 B
Rust
11 lines
302 B
Rust
// run-pass
|
|
fn test1(f: f32) -> bool {
|
|
// test that we properly promote temporaries to allocas when a temporary is assigned to
|
|
// multiple times (assignment is still happening once ∀ possible dataflows).
|
|
!(f.is_nan() || f.is_infinite())
|
|
}
|
|
|
|
fn main() {
|
|
assert_eq!(test1(0.0), true);
|
|
}
|