diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-06 16:52:38 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-17 10:39:18 +1100 |
| commit | a3b4961d5f4ddbb0e86d323ebaeccc391f04d8a7 (patch) | |
| tree | 11983c79f565787193e08fe0b7d86ae771934046 /compiler/rustc_interface/src/passes.rs | |
| parent | 73c1fc5bc0632b16705756fc91174c3c3a44e52d (diff) | |
| download | rust-a3b4961d5f4ddbb0e86d323ebaeccc391f04d8a7.tar.gz rust-a3b4961d5f4ddbb0e86d323ebaeccc391f04d8a7.zip | |
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.
Diffstat (limited to 'compiler/rustc_interface/src/passes.rs')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 39bf96e5d8f..0baf77c4f7e 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -127,7 +127,7 @@ fn configure_and_expand( let tcx = resolver.tcx(); let sess = tcx.sess; let features = tcx.features(); - let lint_store = unerased_lint_store(tcx); + let lint_store = unerased_lint_store(&tcx.sess); let crate_name = tcx.crate_name(LOCAL_CRATE); let lint_check_node = (&krate, pre_configured_attrs); pre_expansion_lint( @@ -319,7 +319,7 @@ fn early_lint_checks(tcx: TyCtxt<'_>, (): ()) { } }); - let lint_store = unerased_lint_store(tcx); + let lint_store = unerased_lint_store(&tcx.sess); rustc_lint::check_ast_node( sess, tcx.features(), @@ -634,7 +634,6 @@ pub fn create_global_ctxt<'tcx>( compiler: &'tcx Compiler, crate_types: Vec<CrateType>, stable_crate_id: StableCrateId, - lint_store: Lrc<LintStore>, dep_graph: DepGraph, untracked: Untracked, gcx_cell: &'tcx OnceLock<GlobalCtxt<'tcx>>, @@ -665,7 +664,6 @@ pub fn create_global_ctxt<'tcx>( sess, crate_types, stable_crate_id, - lint_store, arena, hir_arena, untracked, |
