about summary refs log tree commit diff
path: root/compiler/rustc_public_bridge/src/context/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_public_bridge/src/context/mod.rs')
-rw-r--r--compiler/rustc_public_bridge/src/context/mod.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/compiler/rustc_public_bridge/src/context/mod.rs b/compiler/rustc_public_bridge/src/context/mod.rs
index da20be2a4b3..857a2d4e26b 100644
--- a/compiler/rustc_public_bridge/src/context/mod.rs
+++ b/compiler/rustc_public_bridge/src/context/mod.rs
@@ -1,4 +1,4 @@
-//! Implementation of StableMIR Context.
+//! Implementation of CompilerCtxt.
 
 #![allow(rustc::usage_of_qualified_ty)]
 
@@ -9,30 +9,30 @@ use rustc_middle::ty;
 use rustc_middle::ty::layout::{FnAbiOfHelpers, HasTyCtxt, HasTypingEnv, LayoutOfHelpers};
 use rustc_middle::ty::{Ty, TyCtxt};
 
-use crate::{Bridge, SmirError};
+use crate::{Bridge, Error};
 
+mod helpers;
 mod impls;
-mod traits;
 
-pub use traits::*;
+pub use helpers::*;
 
 /// Provides direct access to rustc's internal queries.
 ///
-/// `SmirInterface` must go through
-/// this context to obtain rustc-level information.
-pub struct SmirCtxt<'tcx, B: Bridge> {
+/// `CompilerInterface` must go through
+/// this context to obtain internal information.
+pub struct CompilerCtxt<'tcx, B: Bridge> {
     pub tcx: TyCtxt<'tcx>,
     _marker: PhantomData<B>,
 }
 
-impl<'tcx, B: Bridge> SmirCtxt<'tcx, B> {
+impl<'tcx, B: Bridge> CompilerCtxt<'tcx, B> {
     pub fn new(tcx: TyCtxt<'tcx>) -> Self {
         Self { tcx, _marker: Default::default() }
     }
 }
 
 /// Implement error handling for extracting function ABI information.
-impl<'tcx, B: Bridge> FnAbiOfHelpers<'tcx> for SmirCtxt<'tcx, B> {
+impl<'tcx, B: Bridge> FnAbiOfHelpers<'tcx> for CompilerCtxt<'tcx, B> {
     type FnAbiOfResult = Result<&'tcx rustc_target::callconv::FnAbi<'tcx, Ty<'tcx>>, B::Error>;
 
     #[inline]
@@ -46,7 +46,7 @@ impl<'tcx, B: Bridge> FnAbiOfHelpers<'tcx> for SmirCtxt<'tcx, B> {
     }
 }
 
-impl<'tcx, B: Bridge> LayoutOfHelpers<'tcx> for SmirCtxt<'tcx, B> {
+impl<'tcx, B: Bridge> LayoutOfHelpers<'tcx> for CompilerCtxt<'tcx, B> {
     type LayoutOfResult = Result<ty::layout::TyAndLayout<'tcx>, B::Error>;
 
     #[inline]
@@ -60,19 +60,19 @@ impl<'tcx, B: Bridge> LayoutOfHelpers<'tcx> for SmirCtxt<'tcx, B> {
     }
 }
 
-impl<'tcx, B: Bridge> HasTypingEnv<'tcx> for SmirCtxt<'tcx, B> {
+impl<'tcx, B: Bridge> HasTypingEnv<'tcx> for CompilerCtxt<'tcx, B> {
     fn typing_env(&self) -> ty::TypingEnv<'tcx> {
         ty::TypingEnv::fully_monomorphized()
     }
 }
 
-impl<'tcx, B: Bridge> HasTyCtxt<'tcx> for SmirCtxt<'tcx, B> {
+impl<'tcx, B: Bridge> HasTyCtxt<'tcx> for CompilerCtxt<'tcx, B> {
     fn tcx(&self) -> TyCtxt<'tcx> {
         self.tcx
     }
 }
 
-impl<'tcx, B: Bridge> HasDataLayout for SmirCtxt<'tcx, B> {
+impl<'tcx, B: Bridge> HasDataLayout for CompilerCtxt<'tcx, B> {
     fn data_layout(&self) -> &rustc_abi::TargetDataLayout {
         self.tcx.data_layout()
     }