Remove registered_lints field from Session
It only exists to pass some information from one part of the driver to another part. We can directly pass this information to the function that needs it to reduce the amount of mutation of the Session.
This commit is contained in:
parent
ead78fdfdf
commit
981f625ba7
4 changed files with 8 additions and 9 deletions
|
@ -479,7 +479,6 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se
|
|||
let mut lint_store = rustc_lint::new_lint_store(sess.enable_internal_lints());
|
||||
if let Some(register_lints) = config.register_lints.as_deref() {
|
||||
register_lints(&sess, &mut lint_store);
|
||||
sess.registered_lints = true;
|
||||
}
|
||||
sess.lint_store = Some(Lrc::new(lint_store));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue