Inline and remove create_lint_store
.
This commit is contained in:
parent
a57770440f
commit
5dfe47acd4
2 changed files with 6 additions and 13 deletions
|
@ -72,17 +72,6 @@ fn count_nodes(krate: &ast::Crate) -> usize {
|
||||||
counter.count
|
counter.count
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn create_lint_store(
|
|
||||||
sess: &Session,
|
|
||||||
register_lints: Option<impl Fn(&Session, &mut LintStore)>,
|
|
||||||
) -> LintStore {
|
|
||||||
let mut lint_store = rustc_lint::new_lint_store(sess.enable_internal_lints());
|
|
||||||
if let Some(register_lints) = register_lints {
|
|
||||||
register_lints(sess, &mut lint_store);
|
|
||||||
}
|
|
||||||
lint_store
|
|
||||||
}
|
|
||||||
|
|
||||||
fn pre_expansion_lint<'a>(
|
fn pre_expansion_lint<'a>(
|
||||||
sess: &Session,
|
sess: &Session,
|
||||||
features: &Features,
|
features: &Features,
|
||||||
|
|
|
@ -148,8 +148,12 @@ impl<'tcx> Queries<'tcx> {
|
||||||
);
|
);
|
||||||
let dep_graph = setup_dep_graph(sess, crate_name, stable_crate_id)?;
|
let dep_graph = setup_dep_graph(sess, crate_name, stable_crate_id)?;
|
||||||
|
|
||||||
let lint_store =
|
let mut lint_store = rustc_lint::new_lint_store(sess.enable_internal_lints());
|
||||||
Lrc::new(passes::create_lint_store(sess, self.compiler.register_lints.as_deref()));
|
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(
|
let cstore = FreezeLock::new(Box::new(CStore::new(
|
||||||
self.codegen_backend().metadata_loader(),
|
self.codegen_backend().metadata_loader(),
|
||||||
stable_crate_id,
|
stable_crate_id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue