]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/match-with-ret-arm.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / binding / match-with-ret-arm.rs
1 // run-pass
2 pub fn main() {
3     // sometimes we have had trouble finding
4     // the right type for f, as we unified
5     // bot and u32 here
6     let f = match "1234".parse::<usize>().ok() {
7         None => return (),
8         Some(num) => num as u32
9     };
10     assert_eq!(f, 1234);
11     println!("{}", f)
12 }