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

Allowing/denying rustc internal lints silently fails #91732

Open
camelid opened this issue Dec 10, 2021 · 1 comment
Open

Allowing/denying rustc internal lints silently fails #91732

camelid opened this issue Dec 10, 2021 · 1 comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Dec 10, 2021

I would think it'd give a feature-gate error.

#![deny(rustc::default_hash_types)]

type Foo = std::collections::HashSet<()>;
   Compiling playground v0.0.1 (/playground)
warning: type alias is never used: `Foo`
 --> src/lib.rs:3:1
  |
3 | type Foo = std::collections::HashSet<()>;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: `playground` (lib) generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 2.21s
@camelid camelid added A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 10, 2021
@jyn514
Copy link
Member

jyn514 commented Dec 11, 2021

@camelid these are tool lints, the same way clippy:: and rustdoc:: are tool lints. I think it's reasonable to remove rustc from known_tool_names so you have to opt-in with register_tool; but that only seems worth it if we can stop special-casing rustc:: lints to only run when -Zunstable-options is passed - I think @oli-obk ran into some trouble with that in the past.

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. C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants