-
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
non_camel_case_types lint check should ignore enum variants #14599
Comments
non_camel_case_types lint checked enum variants, but they are not types. Closes rust-lang#14599
Triage: no change. I think it's fine to use 'type' in this context, but maybe it could be renamed to something else. |
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! |
Detect sysroot dependencies using symlink copy cc rust-lang#7637 It is currently in a proof of concept stage, and it doesn't generates a copy. You need to provide your own sysroot copy in `/tmp/ra-sysroot-hack` in a way that `/tmp/ra-sysroot-hack/library/std/lib.rs` exists and `/tmp/ra-sysroot-hack/Cargo.toml` is [the one from this comment](rust-lang/rust-analyzer#7637 (comment)). I will add the symlink code if we decide that this approach is not a dead end. It seems to somehow work on my system. Go to definition into std dependencies works, type checking can look through fields if I make them public and `cfg_if` appears to work (I tested it by hovering both sides and seeing that the correct one is enabled). Though finding layout of `HashMap` didn't work. Please try it and let me know if I should go forward in this direction or not.
Given that enum variants are not types, it doesn't make sense to have a lint named
non_camel_case_types
be checking the naming of those.Add another lint named
non_camel_case_enum_variants
to check those.The text was updated successfully, but these errors were encountered: