diff options
Diffstat (limited to 'compiler/rustc_transmute/src')
| -rw-r--r-- | compiler/rustc_transmute/src/layout/mod.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_transmute/src/layout/tree.rs | 16 | 
2 files changed, 10 insertions, 10 deletions
| diff --git a/compiler/rustc_transmute/src/layout/mod.rs b/compiler/rustc_transmute/src/layout/mod.rs index 1cf9e0b9b70..596d80869ea 100644 --- a/compiler/rustc_transmute/src/layout/mod.rs +++ b/compiler/rustc_transmute/src/layout/mod.rs @@ -64,7 +64,7 @@ pub mod rustc { use rustc_middle::mir::Mutability; use rustc_middle::ty::layout::{LayoutCx, LayoutError}; - use rustc_middle::ty::{self, Ty, TyCtxt}; + use rustc_middle::ty::{self, Ty}; use rustc_target::abi::Layout; /// A reference in the layout. @@ -124,7 +124,7 @@ pub mod rustc { } pub(crate) fn layout_of<'tcx>( - cx: LayoutCx<'tcx, TyCtxt<'tcx>>, + cx: LayoutCx<'tcx>, ty: Ty<'tcx>, ) -> Result<Layout<'tcx>, &'tcx LayoutError<'tcx>> { use rustc_middle::ty::layout::LayoutOf; diff --git a/compiler/rustc_transmute/src/layout/tree.rs b/compiler/rustc_transmute/src/layout/tree.rs index b5ce465a173..3b7284c1ad6 100644 --- a/compiler/rustc_transmute/src/layout/tree.rs +++ b/compiler/rustc_transmute/src/layout/tree.rs @@ -204,7 +204,7 @@ pub(crate) mod rustc { } impl<'tcx> Tree<Def<'tcx>, Ref<'tcx>> { - pub(crate) fn from_ty(ty: Ty<'tcx>, cx: LayoutCx<'tcx, TyCtxt<'tcx>>) -> Result<Self, Err> { + pub(crate) fn from_ty(ty: Ty<'tcx>, cx: LayoutCx<'tcx>) -> Result<Self, Err> { use rustc_target::abi::HasDataLayout; let layout = layout_of(cx, ty)?; @@ -274,7 +274,7 @@ pub(crate) mod rustc { fn from_tuple( (ty, layout): (Ty<'tcx>, Layout<'tcx>), members: &'tcx List<Ty<'tcx>>, - cx: LayoutCx<'tcx, TyCtxt<'tcx>>, + cx: LayoutCx<'tcx>, ) -> Result<Self, Err> { match &layout.fields { FieldsShape::Primitive => { @@ -299,7 +299,7 @@ pub(crate) mod rustc { fn from_struct( (ty, layout): (Ty<'tcx>, Layout<'tcx>), def: AdtDef<'tcx>, - cx: LayoutCx<'tcx, TyCtxt<'tcx>>, + cx: LayoutCx<'tcx>, ) -> Result<Self, Err> { assert!(def.is_struct()); let def = Def::Adt(def); @@ -314,7 +314,7 @@ pub(crate) mod rustc { fn from_enum( (ty, layout): (Ty<'tcx>, Layout<'tcx>), def: AdtDef<'tcx>, - cx: LayoutCx<'tcx, TyCtxt<'tcx>>, + cx: LayoutCx<'tcx>, ) -> Result<Self, Err> { assert!(def.is_enum()); @@ -389,7 +389,7 @@ pub(crate) mod rustc { tag: Option<(ScalarInt, VariantIdx, TagEncoding<VariantIdx>)>, (ty, layout): (Ty<'tcx>, Layout<'tcx>), total_size: Size, - cx: LayoutCx<'tcx, TyCtxt<'tcx>>, + cx: LayoutCx<'tcx>, ) -> Result<Self, Err> { // This constructor does not support non-`FieldsShape::Arbitrary` // layouts. @@ -470,7 +470,7 @@ pub(crate) mod rustc { fn from_union( (ty, layout): (Ty<'tcx>, Layout<'tcx>), def: AdtDef<'tcx>, - cx: LayoutCx<'tcx, TyCtxt<'tcx>>, + cx: LayoutCx<'tcx>, ) -> Result<Self, Err> { assert!(def.is_union()); @@ -500,7 +500,7 @@ pub(crate) mod rustc { } fn ty_field<'tcx>( - cx: LayoutCx<'tcx, TyCtxt<'tcx>>, + cx: LayoutCx<'tcx>, (ty, layout): (Ty<'tcx>, Layout<'tcx>), i: FieldIdx, ) -> Ty<'tcx> { @@ -527,7 +527,7 @@ pub(crate) mod rustc { } fn ty_variant<'tcx>( - cx: LayoutCx<'tcx, TyCtxt<'tcx>>, + cx: LayoutCx<'tcx>, (ty, layout): (Ty<'tcx>, Layout<'tcx>), i: VariantIdx, ) -> Layout<'tcx> { | 
