]> git.lizzy.rs Git - rust.git/blob - tests/ui/binding/match-with-ret-arm.rs
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / 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 }