diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-17 09:44:28 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-17 17:30:41 +1100 |
| commit | 9582172964608c7eed72a79d05a7e0ed58b23bca (patch) | |
| tree | e212fc81932eef65a14419b2ae682b1d3df012d8 /compiler/rustc_interface/src | |
| parent | 4a57b80f3fbedf86992d15016ea8f14b662b56f3 (diff) | |
| download | rust-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.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/queries.rs | 2 |
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 { |
