Skip to content

Commit 0034727

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 918cc57 commit 0034727

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,
@@ -485,7 +481,6 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se
485481
let compiler = Compiler {
486482
sess: Lrc::new(sess),
487483
codegen_backend: Lrc::from(codegen_backend),
488-
register_lints: config.register_lints,
489484
override_queries: config.override_queries,
490485
};
491486

0 commit comments

Comments
 (0)