diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-20 13:26:09 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-22 13:22:41 +1100 |
| commit | 3a4798c92d5ea9e4a3a0e6d4e2b597b0e9c7cf9a (patch) | |
| tree | 92b0b3481bd2724b5a27496d8bbe070c349140ed /compiler/rustc_interface/src/interface.rs | |
| parent | 09c807ed829b58a67a4e4612279b5832d969b9fa (diff) | |
| download | rust-3a4798c92d5ea9e4a3a0e6d4e2b597b0e9c7cf9a.tar.gz rust-3a4798c92d5ea9e4a3a0e6d4e2b597b0e9c7cf9a.zip | |
Make `Compiler::{sess,codegen_backend}` public.
And remove the relevant getters on `Compiler` and `Queries`.
Diffstat (limited to 'compiler/rustc_interface/src/interface.rs')
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index 6225424fe4a..91fd4b4a1d0 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -38,18 +38,12 @@ 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 { - sess: Session, - codegen_backend: Box<dyn CodegenBackend>, + pub sess: Session, + pub codegen_backend: Box<dyn CodegenBackend>, pub(crate) override_queries: Option<fn(&Session, &mut Providers)>, } impl Compiler { - pub fn session(&self) -> &Session { - &self.sess - } - pub fn codegen_backend(&self) -> &dyn CodegenBackend { - &*self.codegen_backend - } pub fn build_output_filenames( &self, sess: &Session, |
