diff options
| author | flip1995 <hello@philkrones.com> | 2020-10-07 15:34:06 +0200 |
|---|---|---|
| committer | flip1995 <philipp.krones@embecosm.com> | 2020-11-24 10:37:14 +0100 |
| commit | be1e502cef3bb756c388c0b4f8d4bba73458e2b0 (patch) | |
| tree | 3247c326133a477ae462655d237968d76ff2e2a6 /compiler/rustc_interface/src | |
| parent | 238994f3b1d6b05ed5c26c1b3af03723a2421700 (diff) | |
| download | rust-be1e502cef3bb756c388c0b4f8d4bba73458e2b0.tar.gz rust-be1e502cef3bb756c388c0b4f8d4bba73458e2b0.zip | |
Add method to get the register_lints function from the compiler
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index 73a51ad477b..11dd6ec32c0 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -56,6 +56,9 @@ impl Compiler { pub fn output_file(&self) -> &Option<PathBuf> { &self.output_file } + pub fn register_lints(&self) -> &Option<Box<dyn Fn(&Session, &mut LintStore) + Send + Sync>> { + &self.register_lints + } pub fn build_output_filenames( &self, sess: &Session, |
