Skip to content

Commit dededd2

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 a3b4961 commit dededd2

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

Diff for: 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,
@@ -498,7 +494,6 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se
498494
let compiler = Compiler {
499495
sess: Lrc::new(sess),
500496
codegen_backend: Lrc::from(codegen_backend),
501-
register_lints: config.register_lints,
502497
override_queries: config.override_queries,
503498
};
504499

0 commit comments

Comments
 (0)