Skip to content

add an off-by-default lint for catching constant statics #18312

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

Closed
thestinger opened this issue Oct 25, 2014 · 3 comments
Closed

add an off-by-default lint for catching constant statics #18312

thestinger opened this issue Oct 25, 2014 · 3 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-enhancement Category: An issue proposing an enhancement or a PR with one. I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@thestinger
Copy link
Contributor

Crates not concerned about providing a stable ABI for global variables should be able to opt-in to a lint to deny constant statics. This would catch regressions due to the removal of inlining and insignificant addresses for constant static variables (#18311).

@thestinger thestinger added I-slow Issue: Problems and improvements with respect to performance of generated code. C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Oct 25, 2014
@thestinger
Copy link
Contributor Author

It would always make sense to lint for private statics.

@ghost ghost added the A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. label Oct 26, 2014
@steveklabnik
Copy link
Member

Traige: no change.

@steveklabnik
Copy link
Member

Since new lints have a big impact on users of rustc, the policy is that they should go through the RFC process like other user-facing changes. As such, I'm going to give this one a close, but if anyone comes across this ticket and wants this lint, consider adding it to clippy and/or writing up an RFC. Thanks!

lnicola pushed a commit to lnicola/rust that referenced this issue Oct 29, 2024
Report document symbols of kind `variable` for let statements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-enhancement Category: An issue proposing an enhancement or a PR with one. I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

No branches or pull requests

2 participants