Compute lint_levels by definition

This commit is contained in:
Deadbeef
2022-07-22 16:48:36 +00:00
committed by Camille GILLOT
parent c97922dca5
commit eb19a8a620
13 changed files with 482 additions and 332 deletions

View File

@@ -273,10 +273,14 @@ rustc_queries! {
separate_provide_extern
}
query lint_levels(_: ()) -> LintLevelMap {
query lint_levels_on(key: HirId) -> FxHashMap<LintId, LevelAndSource> {
arena_cache
eval_always
desc { "computing the lint levels for items in this crate" }
desc { |tcx| "looking up lint levels for `{}`", key }
}
query lint_expectations(_: ()) -> Vec<(LintExpectationId, LintExpectation)> {
arena_cache
desc { "computing `#[expect]`ed lints in this crate" }
}
query parent_module_from_def_id(key: LocalDefId) -> LocalDefId {