-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
there's no #[allow(shadowed_label_names)] #31745
Comments
This might become a hard error later, so it doesn't seem like a good idea to turn the warning off |
Seems like the same argument could be applied to the other future-incompatibility lints. What even is the plan for a feature that might make duplicate labels within a function a problem? Also, there are false positives of this warning (for example, a label name within a closure). I will file a separate bug, but false positives would be a motivation for locally turning off the warning. |
I think there was this idea of allowing nameable regions ( |
Triage: not aware of any changes |
Is the compiler team planning to make the needed decision? ;) Otherwise we should just close. |
Fun fact: |
This doesn't need decision, just implementation - with current state of hygiene false positives can just be fixed and everything else turned into hard errors (this stuff issued deprecation warnings for very long time). I'll r+ a PR turning this into a deny-by-default lint as well. |
Could someone add a reproducer to this issue? |
Is there any reasonable possibility that we will actually implement the feature that has the future-imcompatibility issue? |
The warning about shadowed label names can't be turned off. Seems like it ought to have some name and be under the "future incompatible" lint group.
EDIT (ehuss):
Example:
Warning added in #24162, see also #21633 and https://internals.rust-lang.org/t/psa-rejecting-duplicate-loop-labels/1833.
The text was updated successfully, but these errors were encountered: