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
enum namespacing was introduced in RFC 390, which makes the following code compiles:
enumEmm{A,B,}fnmain(){useEmm::*;let a = A;let b = B;}
However:
structEmm;implEmm{constA:usize = 0;constB:usize = 1;}fnmain(){// Compileslet a = Emm::A;let b = Emm::B;// Doesn't compileuseEmm::*;let a = A;let b = B;}
I think it would be usefule if we have namespacing of member in impl? I met this issue on using bitflags, which depends on the feature of declaring const value in an impl block. Without namespacing of impl member we get this result:
use bitflags::bitflags;bitflags!{structFlags:u32{constA = 0b00000001;constB = 0b00000010;}}fnmain(){// Compileslet e = Flags::A | Flags::B;// Doesn't compileuseFlags::*;let e = A | B;}
The text was updated successfully, but these errors were encountered:
enum namespacing
was introduced in RFC 390, which makes the following code compiles:However:
I think it would be usefule if we have namespacing of member in impl? I met this issue on using
bitflags
, which depends on the feature of declaring const value in an impl block. Without namespacing of impl member we get this result:The text was updated successfully, but these errors were encountered: