Do not run lints that cannot emit
Before this change, adding a lint was a difficult matter because it always had some overhead involved. This was because all lints would run, no matter their default level, or if the user had #![allow]ed them. This PR changes that
This commit is contained in:
parent
c926476d01
commit
b4da058595
45 changed files with 264 additions and 50 deletions
|
@ -422,6 +422,11 @@ rustc_queries! {
|
|||
desc { "computing `#[expect]`ed lints in this crate" }
|
||||
}
|
||||
|
||||
query lints_that_can_emit(_: ()) -> &'tcx Lrc<(Vec<String>, Vec<String>)> {
|
||||
arena_cache
|
||||
desc { "Computing all lints that are explicitly enabled or with a default level greater than Allow" }
|
||||
}
|
||||
|
||||
query expn_that_defined(key: DefId) -> rustc_span::ExpnId {
|
||||
desc { |tcx| "getting the expansion that defined `{}`", tcx.def_path_str(key) }
|
||||
separate_provide_extern
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue