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 = result::Result; /// 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, pub(crate) override_queries: Option, } 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 {