about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-11-25 19:51:54 +0100
committerGitHub <noreply@github.com>2023-11-25 19:51:54 +0100
commit5d2b6b355649d4a5359f2737c5bf32f9ae5d03f8 (patch)
treeaf837382c4df5c4ab67a76b76c80a5c91c043746 /compiler/rustc_session
parent9a59b059d5461a9de67719a8d8ce8ff8bdd06e06 (diff)
parent55393b6eca0c203b03b76447e42af0bd1d06204d (diff)
downloadrust-5d2b6b355649d4a5359f2737c5bf32f9ae5d03f8.tar.gz
rust-5d2b6b355649d4a5359f2737c5bf32f9ae5d03f8.zip
Rollup merge of #118017 - tamird:better-safety, r=cjgillot
rustc_lint: address latent TODO

See individual commits.
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/session.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index efd75ce6151..20a67d6d036 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -139,6 +139,8 @@ pub struct CompilerIO {
     pub temps_dir: Option<PathBuf>,
 }
 
+pub trait LintStoreMarker: Any + DynSync + DynSend {}
+
 /// Represents the data associated with a compilation
 /// session for a single crate.
 pub struct Session {
@@ -171,10 +173,7 @@ pub struct Session {
     pub jobserver: Client,
 
     /// This only ever stores a `LintStore` but we don't want a dependency on that type here.
-    ///
-    /// FIXME(Centril): consider `dyn LintStoreMarker` once
-    /// we can upcast to `Any` for some additional type safety.
-    pub lint_store: Option<Lrc<dyn Any + DynSync + DynSend>>,
+    pub lint_store: Option<Lrc<dyn LintStoreMarker>>,
 
     /// Should be set if any lints are registered in `lint_store`.
     pub registered_lints: bool,