Enum constructors defined in the same file are no longer allowed.
enum Mode { Global, Local, } fn which_mode() -> Mode { Global } fn main() { match which_mode() { Global => println!("Global"), Local => println!("Local"), } }
In which_mode function which_mode compiler generates the error message "Unresolved Global name". When I qualify it as Mode::Global , it works. Now he believes that Global in the match expression is binding and therefore irrefutable!
Last behavior - November 11th November successfully compiled the above code. Since this current behavior is like this, why Some , Ok , etc. Do not need qualified ways?
source share