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.
The text was updated successfully, but these errors were encountered:
Oh, and moving the use A out of normal to mod bar { use A; ... makes wrong compile without warning, so I guess the global boolean is just being ignored somewhere.
That is, it's not obeying the global part of the path and instead just creating a variable with the name
A
.The text was updated successfully, but these errors were encountered: