1
Fork 0

Use () for lint_levels.

This commit is contained in:
Camille GILLOT 2021-05-11 12:22:11 +02:00
parent b7bf467fa3
commit 9d15abe0cc
3 changed files with 5 additions and 7 deletions

View file

@ -199,7 +199,7 @@ rustc_queries! {
desc { "looking up the native libraries of a linked crate" }
}
query lint_levels(_: CrateNum) -> LintLevelMap {
query lint_levels(_: ()) -> LintLevelMap {
storage(ArenaCacheSelector<'tcx>)
eval_always
desc { "computing the lint levels for items in this crate" }

View file

@ -2623,7 +2623,7 @@ impl<'tcx> TyCtxt<'tcx> {
lint: &'static Lint,
mut id: hir::HirId,
) -> (Level, LintLevelSource) {
let sets = self.lint_levels(LOCAL_CRATE);
let sets = self.lint_levels(());
loop {
if let Some(pair) = sets.level_and_source(lint, id, self.sess) {
return pair;