about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-11-17 09:44:28 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-11-17 17:30:41 +1100
commit9582172964608c7eed72a79d05a7e0ed58b23bca (patch)
treee212fc81932eef65a14419b2ae682b1d3df012d8 /compiler/rustc_interface/src
parent4a57b80f3fbedf86992d15016ea8f14b662b56f3 (diff)
downloadrust-9582172964608c7eed72a79d05a7e0ed58b23bca.tar.gz
rust-9582172964608c7eed72a79d05a7e0ed58b23bca.zip
Make `Compiler::sess` private.
Like `Compiler::codegen_backend`.
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/interface.rs2
-rw-r--r--compiler/rustc_interface/src/queries.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs
index 6db26b976d9..6225424fe4a 100644
--- a/compiler/rustc_interface/src/interface.rs
+++ b/compiler/rustc_interface/src/interface.rs
@@ -38,7 +38,7 @@ pub type Result<T> = result::Result<T, ErrorGuaranteed>;
 /// Can be used to run `rustc_interface` queries.
 /// Created by passing [`Config`] to [`run_compiler`].
 pub struct Compiler {
-    pub(crate) sess: Session,
+    sess: Session,
     codegen_backend: Box<dyn CodegenBackend>,
     pub(crate) override_queries: Option<fn(&Session, &mut Providers)>,
 }
diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs
index 9762e924cc4..fbf2dbcdae5 100644
--- a/compiler/rustc_interface/src/queries.rs
+++ b/compiler/rustc_interface/src/queries.rs
@@ -102,7 +102,7 @@ impl<'tcx> Queries<'tcx> {
     }
 
     fn session(&self) -> &Session {
-        &self.compiler.sess
+        &self.compiler.session()
     }
 
     fn codegen_backend(&self) -> &dyn CodegenBackend {