Skip to content

Commit ea3bb05

Browse files
committed
SmirContainer to Container
1 parent aa87845 commit ea3bb05

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

compiler/rustc_public/src/compiler_interface.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::cell::Cell;
77

88
use rustc_hir::def::DefKind;
99
use rustc_public_bridge::context::CompilerCtxt;
10-
use rustc_public_bridge::{Bridge, SmirContainer};
10+
use rustc_public_bridge::{Bridge, Container};
1111
use tracing::debug;
1212

1313
use crate::abi::{FnAbi, Layout, LayoutShape, ReprOptions};
@@ -316,7 +316,7 @@ pub(crate) trait CompilerInterface {
316316
fn associated_items(&self, def_id: DefId) -> AssocItems;
317317
}
318318

319-
impl<'tcx> CompilerInterface for SmirContainer<'tcx, BridgeTys> {
319+
impl<'tcx> CompilerInterface for Container<'tcx, BridgeTys> {
320320
fn entry_fn(&self) -> Option<CrateItem> {
321321
let mut tables = self.tables.borrow_mut();
322322
let cx = &*self.cx.borrow();

compiler/rustc_public/src/rustc_internal/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::cell::{Cell, RefCell};
77

88
use rustc_middle::ty::TyCtxt;
99
use rustc_public_bridge::context::CompilerCtxt;
10-
use rustc_public_bridge::{Bridge, SmirContainer, Tables};
10+
use rustc_public_bridge::{Bridge, Container, Tables};
1111
use rustc_span::def_id::CrateNum;
1212
use scoped_tls::scoped_thread_local;
1313

@@ -60,7 +60,7 @@ pub fn crate_num(item: &crate::Crate) -> CrateNum {
6060
// datastructures and stable MIR datastructures
6161
scoped_thread_local! (static TLV: Cell<*const ()>);
6262

63-
pub(crate) fn init<'tcx, F, T, B: Bridge>(container: &SmirContainer<'tcx, B>, f: F) -> T
63+
pub(crate) fn init<'tcx, F, T, B: Bridge>(container: &Container<'tcx, B>, f: F) -> T
6464
where
6565
F: FnOnce() -> T,
6666
{
@@ -78,7 +78,7 @@ pub(crate) fn with_container<R, B: Bridge>(
7878
TLV.with(|tlv| {
7979
let ptr = tlv.get();
8080
assert!(!ptr.is_null());
81-
let container = ptr as *const SmirContainer<'_, B>;
81+
let container = ptr as *const Container<'_, B>;
8282
let mut tables = unsafe { (*container).tables.borrow_mut() };
8383
let cx = unsafe { (*container).cx.borrow() };
8484
f(&mut *tables, &*cx)
@@ -90,7 +90,7 @@ where
9090
F: FnOnce() -> T,
9191
{
9292
let compiler_cx = RefCell::new(CompilerCtxt::new(tcx));
93-
let container = SmirContainer { tables: RefCell::new(Tables::default()), cx: compiler_cx };
93+
let container = Container { tables: RefCell::new(Tables::default()), cx: compiler_cx };
9494

9595
crate::compiler_interface::run(&container, || init(&container, f))
9696
}

compiler/rustc_public_bridge/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub mod context;
4646
pub mod rustc_internal {}
4747

4848
/// A container which is used for TLS.
49-
pub struct SmirContainer<'tcx, B: Bridge> {
49+
pub struct Container<'tcx, B: Bridge> {
5050
pub tables: RefCell<Tables<'tcx, B>>,
5151
pub cx: RefCell<CompilerCtxt<'tcx, B>>,
5252
}

0 commit comments

Comments
 (0)