-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Unit/tuple structs with the same name as a module are allowed. #29185
Labels
A-resolve
Area: Path resolution
Comments
I found this issue when using a struct with fields. This only causes the error when the module is defined first. https://play.rust-lang.org/?gist=f66e0f4649a86c845270&version=stable The error does not occur with unit structs or tuple structs. https://play.rust-lang.org/?gist=55e9c9cd9938220a1031&version=stable |
This is in theory being fixed by #26421, but it looks like progress is slow there |
Closing as duplicate of #21546. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following two type-definition/module conflicts cause errors:
But unit and tuple structs, due to the special-casing to check for value conflicts, end up not checking for module conflicts, resulting in the following two examples compiling:
The text was updated successfully, but these errors were encountered: