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
enumFoo{A}mod bar {pubfnnormal(x:::Foo){useA;match x {A => {}}}pubfnwrong(x:::Foo){match x {::A => {}}}}fnmain(){ bar::normal(A); bar::wrong(A);}
global-path-match.rs:11:13: 11:16 warning: unused variable: `A`, #[warn(unused_variable)] on by default
global-path-match.rs:11 ::A => {}
^~~
global-path-match.rs:11:13: 11:16 warning: variable names should start with a lowercase character, #[warn(uppercase_variables)] on by default
global-path-match.rs:11 ::A => {}
^~~
That is, it's not obeying the global part of the path and instead just creating a variable with the name A.