Skip to content

Skip LintPasses whose lints are all Allow #15161

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
kmcallister opened this issue Jun 24, 2014 · 5 comments
Closed

Skip LintPasses whose lints are all Allow #15161

kmcallister opened this issue Jun 24, 2014 · 5 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@kmcallister
Copy link
Contributor

Since each LintPass declares the lints it can emit, we could speed up lint checking by skipping passes whose lints are all Allow. But some passes have side effects gathering information for other parts of the compiler, and those should always run.

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

Triage: no change that I'm aware of.

@sanxiyn
Copy link
Member

sanxiyn commented Nov 9, 2015

This doesn't seem workable, since LintPass only knows about lints's default levels, and lints's actual levels can be changed by attributes.

@steveklabnik steveklabnik added A-compiler T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 8, 2017
@steveklabnik
Copy link
Member

Triage: no changes I'm aware of.

@Mark-Simulacrum
Copy link
Member

I don't see how this can work since the level a lint warns can change with #[deny/warn/etc]. As such I'm going to close this.

@sanxiyn
Copy link
Member

sanxiyn commented Jun 21, 2017

This can actually work, but workable strategy is now tracked at #42511.

bors added a commit to rust-lang-ci/rust that referenced this issue Jul 17, 2023
…r=Veykril

internal: add `library` fixture meta

Currently, there is no way to specify `CrateOrigin` of a file fixture ([this] might be a bug?). This PR adds `library` meta to explicitly specify the fixture to be `CrateOrigin::Library` and also makes sure crates that belong to a library source root are set `CrateOrigin::Library`.

(`library` isn't really the best name. It essentially means that the crate is outside workspace but `non_workspace_member` feels a bit too long. Suggestions for the better name would be appreciated)

Additionally:
- documents the fixture meta syntax as thoroughly as possible
- refactors relevant code

[this]: https://github.com/rust-lang/rust-analyzer/blob/4b06d3c595a75fd84bfce2b7f2861a913ed6e530/crates/base-db/src/fixture.rs#L450
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. 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

4 participants