diff options
Diffstat (limited to 'compiler/rustc_public_bridge/src/alloc.rs')
| -rw-r--r-- | compiler/rustc_public_bridge/src/alloc.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_public_bridge/src/alloc.rs b/compiler/rustc_public_bridge/src/alloc.rs index 23bbaddce06..906e4aae9f2 100644 --- a/compiler/rustc_public_bridge/src/alloc.rs +++ b/compiler/rustc_public_bridge/src/alloc.rs @@ -10,12 +10,12 @@ use rustc_middle::mir::interpret::{ }; use rustc_middle::ty::{Ty, layout}; -use super::{SmirCtxt, Tables}; +use super::{CompilerCtxt, Tables}; use crate::bridge::Allocation as _; use crate::{Bridge, SmirError}; pub fn create_ty_and_layout<'tcx, B: Bridge>( - cx: &SmirCtxt<'tcx, B>, + cx: &CompilerCtxt<'tcx, B>, ty: Ty<'tcx>, ) -> Result<TyAndLayout<'tcx, Ty<'tcx>>, &'tcx layout::LayoutError<'tcx>> { use crate::context::SmirTypingEnv; @@ -25,7 +25,7 @@ pub fn create_ty_and_layout<'tcx, B: Bridge>( pub fn try_new_scalar<'tcx, B: Bridge>( layout: TyAndLayout<'tcx, Ty<'tcx>>, scalar: Scalar, - cx: &SmirCtxt<'tcx, B>, + cx: &CompilerCtxt<'tcx, B>, ) -> Result<Allocation, B::Error> { let size = scalar.size(); let mut allocation = Allocation::new(size, layout.align.abi, AllocInit::Uninit, ()); @@ -40,7 +40,7 @@ pub fn try_new_slice<'tcx, B: Bridge>( layout: TyAndLayout<'tcx, Ty<'tcx>>, data: ConstAllocation<'tcx>, meta: u64, - cx: &SmirCtxt<'tcx, B>, + cx: &CompilerCtxt<'tcx, B>, ) -> Result<Allocation, B::Error> { let alloc_id = cx.tcx.reserve_and_set_memory_alloc(data); let ptr = Pointer::new(alloc_id.into(), Size::ZERO); @@ -60,7 +60,7 @@ pub fn try_new_slice<'tcx, B: Bridge>( pub fn try_new_indirect<'tcx, B: Bridge>( alloc_id: AllocId, - cx: &SmirCtxt<'tcx, B>, + cx: &CompilerCtxt<'tcx, B>, ) -> ConstAllocation<'tcx> { let alloc = cx.tcx.global_alloc(alloc_id).unwrap_memory(); @@ -72,7 +72,7 @@ pub fn allocation_filter<'tcx, B: Bridge>( alloc: &rustc_middle::mir::interpret::Allocation, alloc_range: AllocRange, tables: &mut Tables<'tcx, B>, - cx: &SmirCtxt<'tcx, B>, + cx: &CompilerCtxt<'tcx, B>, ) -> B::Allocation { let mut bytes: Vec<Option<u8>> = alloc .inspect_with_uninit_and_ptr_outside_interpreter( |
