You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi when i use rust 1.53 version some code about pattern match below make me confused,and i think this is a bug or a problem that cannot be ignored.
let x = Some(2);assert!(matches!(x,Some(1 | 2)));//ok x is Some(2)assert!(matches!(Some(1),Some(1|2)));//okassert!(matches!(Some(2),Some(1|2)));//oklet y = Some(1 | 2);//y is Some(3)// assert!(matches!(Some(3),Some(1|2)));// error, Some(1|2) =>is Some(1) | Some(2) or Some(3)?
The text was updated successfully, but these errors were encountered:
hi when i use rust 1.53 version some code about pattern match below make me confused,and i think this is a bug or a problem that cannot be ignored.
The text was updated successfully, but these errors were encountered: