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
#[deriving(Show)]enumState{AtoZ(uint),Numeric,}fnmain(){let state = Numeric;let b = 97u8;// alet r = match(state, b aschar){(AtoZ(..),'a'..'z') => {"Named"},(Numeric,'x') => {"Hex"},
_ => {"Other"}};println!("{} {}: {}", state, b aschar, r);}
Outputs Numeric a: Hex. Clearly, a shouldn't match x.
Worth noting: if you change the first range to not include x, such as a..w, it works correctly. Also, removing the field from AtoZ also makes the match work correctly.