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:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user