Skip to content
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

Closed
ghost opened this issue Jun 2, 2014 · 2 comments
Closed

non_camel_case_types lint check should ignore enum variants #14599

ghost opened this issue Jun 2, 2014 · 2 comments
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut.

Comments

@ghost
Copy link

ghost commented Jun 2, 2014

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.

@huonw huonw added the A-lint label Jun 2, 2014
Sawyer47 added a commit to Sawyer47/rust that referenced this issue Jun 17, 2014
non_camel_case_types lint checked enum variants, but they are not types.

Closes rust-lang#14599
@steveklabnik
Copy link
Member

Triage: no change.

I think it's fine to use 'type' in this context, but maybe it could be renamed to something else.

@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!

bors added a commit to rust-lang-ci/rust that referenced this issue Jun 5, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants