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
This would be a very minor change. To give an example of what this would do, the following code would work under this change:
use foo::Foo;mod foo {pubstructFoo(());}constFoo:() = ();fnmain(){let x = Foo;}
Currently, it doesn’t because the import at the top conflicts with the const Foo, even though the tuple struct Foo is unusable as a value (because it has private fields). This would be a very minor backwards-compatible change, but would make using tuple structs with private fields less bad (equivalent to a normal struct with private fields, I think). cc rust-lang/rust#22045