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
|
||||
}
|
||||
|
||||
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>(
|
||||
sess: &Session,
|
||||
features: &Features,
|
||||
|
|
|
@ -148,8 +148,12 @@ impl<'tcx> Queries<'tcx> {
|
|||
);
|
||||
let dep_graph = setup_dep_graph(sess, crate_name, stable_crate_id)?;
|
||||
|
||||
let lint_store =
|
||||
Lrc::new(passes::create_lint_store(sess, self.compiler.register_lints.as_deref()));
|
||||
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue