Move lint_store from GlobalCtxt to Session.
This was made possible by the removal of plugin support, which simplified lint store creation. This simplifies the places in rustc and rustdoc that call `describe_lints`, which are early on. The lint store is now built before those places, so they don't have to create their own lint store for temporary use, they can just use the main one.
This commit is contained in:
@@ -123,7 +123,7 @@ impl LintLevelSets {
|
||||
}
|
||||
|
||||
fn lint_expectations(tcx: TyCtxt<'_>, (): ()) -> Vec<(LintExpectationId, LintExpectation)> {
|
||||
let store = unerased_lint_store(tcx);
|
||||
let store = unerased_lint_store(&tcx.sess);
|
||||
|
||||
let mut builder = LintLevelsBuilder {
|
||||
sess: tcx.sess,
|
||||
@@ -152,7 +152,7 @@ fn lint_expectations(tcx: TyCtxt<'_>, (): ()) -> Vec<(LintExpectationId, LintExp
|
||||
|
||||
#[instrument(level = "trace", skip(tcx), ret)]
|
||||
fn shallow_lint_levels_on(tcx: TyCtxt<'_>, owner: hir::OwnerId) -> ShallowLintLevelMap {
|
||||
let store = unerased_lint_store(tcx);
|
||||
let store = unerased_lint_store(&tcx.sess);
|
||||
let attrs = tcx.hir_attrs(owner);
|
||||
|
||||
let mut levels = LintLevelsBuilder {
|
||||
|
||||
Reference in New Issue
Block a user