about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-12-12 11:45:10 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-12-13 10:46:53 +0000
commit981f625ba7c8e8ddcf6e470eb54d822eaf9fb300 (patch)
tree9ef00cff5eff1816f31b505b6bd3ad6bf3a13f46 /compiler/rustc_session
parentead78fdfdf6692b2ecef7f47dfc934011c51fe4c (diff)
downloadrust-981f625ba7c8e8ddcf6e470eb54d822eaf9fb300.tar.gz
rust-981f625ba7c8e8ddcf6e470eb54d822eaf9fb300.zip
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.
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/session.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index 160525cead0..9f6106f9cfb 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -156,9 +156,6 @@ pub struct Session {
     /// This only ever stores a `LintStore` but we don't want a dependency on that type here.
     pub lint_store: Option<Lrc<dyn LintStoreMarker>>,
 
-    /// Should be set if any lints are registered in `lint_store`.
-    pub registered_lints: bool,
-
     /// Cap lint level specified by a driver specifically.
     pub driver_lint_caps: FxHashMap<lint::LintId, lint::Level>,
 
@@ -1068,7 +1065,6 @@ pub fn build_session(
         prof,
         code_stats: Default::default(),
         lint_store: None,
-        registered_lints: false,
         driver_lint_caps,
         ctfe_backtrace,
         miri_unleashed_features: Lock::new(Default::default()),