1
Fork 0

Rollup merge of #108806 - cjgillot:query-lints, r=davidtwco

Querify register_tools and post-expansion early lints

The 2 extra queries correspond to code that happen before and after macro expansion, and don't need the resolver to exist.
This commit is contained in:
Matthias Krüger 2023-03-11 15:43:15 +01:00 committed by GitHub
commit df50001c7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 74 additions and 40 deletions

View file

@ -128,7 +128,7 @@ fn lint_expectations(tcx: TyCtxt<'_>, (): ()) -> Vec<(LintExpectationId, LintExp
},
warn_about_weird_lints: false,
store,
registered_tools: &tcx.resolutions(()).registered_tools,
registered_tools: &tcx.registered_tools(()),
};
builder.add_command_line();
@ -156,7 +156,7 @@ fn shallow_lint_levels_on(tcx: TyCtxt<'_>, owner: hir::OwnerId) -> ShallowLintLe
},
warn_about_weird_lints: false,
store,
registered_tools: &tcx.resolutions(()).registered_tools,
registered_tools: &tcx.registered_tools(()),
};
if owner == hir::CRATE_OWNER_ID {