Skip to content

Commit 31ce67e

Browse files
committed
Remove Compiler::register_lints.
Lint registration now happens early enough that we can run it from `Config`, before `Compiler` is created.
1 parent 788f108 commit 31ce67e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

compiler/rustc_interface/src/interface.rs

-5
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ pub type Result<T> = result::Result<T, ErrorGuaranteed>;
4040
pub struct Compiler {
4141
pub(crate) sess: Lrc<Session>,
4242
codegen_backend: Lrc<dyn CodegenBackend>,
43-
pub(crate) register_lints: Option<Box<dyn Fn(&Session, &mut LintStore) + Send + Sync>>,
4443
pub(crate) override_queries: Option<fn(&Session, &mut Providers)>,
4544
}
4645

@@ -51,9 +50,6 @@ impl Compiler {
5150
pub fn codegen_backend(&self) -> &Lrc<dyn CodegenBackend> {
5251
&self.codegen_backend
5352
}
54-
pub fn register_lints(&self) -> &Option<Box<dyn Fn(&Session, &mut LintStore) + Send + Sync>> {
55-
&self.register_lints
56-
}
5753
pub fn build_output_filenames(
5854
&self,
5955
sess: &Session,
@@ -486,7 +482,6 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se
486482
let compiler = Compiler {
487483
sess: Lrc::new(sess),
488484
codegen_backend: Lrc::from(codegen_backend),
489-
register_lints: config.register_lints,
490485
override_queries: config.override_queries,
491486
};
492487

0 commit comments

Comments
 (0)