1 // This used to mis-compile because the mir-opt `SimplifyArmIdentity`
2 // did not check that the types matched up in the `Ok(r)` branch.
5 // compile-flags: -Zmir-opt-level=3
7 #[derive(Debug, PartialEq, Eq)]
8 enum SpecialsRes { Res(u64) }
10 fn e103() -> SpecialsRes {
11 if let Ok(r) = "1".parse() {
19 assert_eq!(e103(), SpecialsRes::Res(1));