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:
parent
73c1fc5bc0
commit
a3b4961d5f
10 changed files with 59 additions and 64 deletions
|
@ -148,12 +148,6 @@ impl<'tcx> Queries<'tcx> {
|
|||
);
|
||||
let dep_graph = setup_dep_graph(sess, crate_name, stable_crate_id)?;
|
||||
|
||||
let mut lint_store = rustc_lint::new_lint_store(sess.enable_internal_lints());
|
||||
if let Some(register_lints) = self.compiler.register_lints.as_deref() {
|
||||
register_lints(sess, &mut lint_store);
|
||||
}
|
||||
let lint_store = Lrc::new(lint_store);
|
||||
|
||||
let cstore = FreezeLock::new(Box::new(CStore::new(
|
||||
self.codegen_backend().metadata_loader(),
|
||||
stable_crate_id,
|
||||
|
@ -168,7 +162,6 @@ impl<'tcx> Queries<'tcx> {
|
|||
self.compiler,
|
||||
crate_types,
|
||||
stable_crate_id,
|
||||
lint_store,
|
||||
dep_graph,
|
||||
untracked,
|
||||
&self.gcx_cell,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue