]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-21634.rs
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
[rust.git] / src / test / ui / issues / issue-21634.rs
1 // run-pass
2 #![allow(stable_features)]
3
4 #![feature(cfg_target_feature)]
5
6 #[cfg(any(not(target_arch = "x86"), target_feature = "sse2"))]
7 fn main() {
8     if let Ok(x) = "3.1415".parse::<f64>() {
9         assert_eq!(false, x <= 0.0);
10     }
11     if let Ok(x) = "3.1415".parse::<f64>() {
12         assert_eq!(3.1415, x + 0.0);
13     }
14     if let Ok(mut x) = "3.1415".parse::<f64>() {
15         assert_eq!(8.1415, { x += 5.0; x });
16     }
17 }
18
19 #[cfg(all(target_arch = "x86", not(target_feature = "sse2")))]
20 fn main() {}