-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enum struct variants can mask regular struct constructors #5792
Comments
still reproduces. Looks like there are a couple bugs here:
|
See #7044. |
So, the reason why swapping the order works is because in resolve Also, the reason why the error messages refer to duplicate type definitions is because they're added to the Type namespace as opposed to the Value namespace. (Though, new type and unit structs are added to both the type and value namespaces.) |
Oh and rustc doesn't actually consider |
I came out of the meeting from 2013-06-18 thinking that we might want to allow the shadowing here, but the meeting notes don't actually reflect much/any justification for that conclusion that I can see. I guess its good to be consistent, in any case. |
Oh, I had thought the consensus was it should be an error given pcwalton's comment. |
Rollup of 5 pull requests Successful merges: - rust-lang#5443 (Some accuracy lints for floating point operations) - rust-lang#5752 (Move range_minus_one to pedantic) - rust-lang#5756 (unnecessary_sort_by: avoid linting if key borrows) - rust-lang#5784 (Fix out of bounds access by checking length equality BEFORE accessing by index.) - rust-lang#5786 (fix phrase in new_lint issue template) Failed merges: r? @ghost changelog: rollup
@thestinger found this odd bug. This code:
properly errors out with:
However, if you swap the enum and struct definition, it compiles fine with rust HEAD:
The text was updated successfully, but these errors were encountered: