Skip to content

Commit b710c0d

Browse files
committed
rustc_target: move LayoutOf to ty::layout.
1 parent 39e16da commit b710c0d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/common.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,7 @@ pub(crate) struct FunctionCx<'m, 'clif, 'tcx: 'm> {
257257
}
258258

259259
impl<'tcx> LayoutOf<'tcx> for FunctionCx<'_, '_, 'tcx> {
260-
type Ty = Ty<'tcx>;
261-
type TyAndLayout = TyAndLayout<'tcx>;
260+
type LayoutOfResult = TyAndLayout<'tcx>;
262261

263262
fn layout_of(&self, ty: Ty<'tcx>) -> TyAndLayout<'tcx> {
264263
RevealAllLayoutCx(self.tcx).layout_of(ty)
@@ -365,8 +364,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
365364
pub(crate) struct RevealAllLayoutCx<'tcx>(pub(crate) TyCtxt<'tcx>);
366365

367366
impl<'tcx> LayoutOf<'tcx> for RevealAllLayoutCx<'tcx> {
368-
type Ty = Ty<'tcx>;
369-
type TyAndLayout = TyAndLayout<'tcx>;
367+
type LayoutOfResult = TyAndLayout<'tcx>;
370368

371369
fn layout_of(&self, ty: Ty<'tcx>) -> TyAndLayout<'tcx> {
372370
assert!(!ty.still_further_specializable());

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ mod prelude {
7979
pub(crate) use rustc_hir::def_id::{DefId, LOCAL_CRATE};
8080
pub(crate) use rustc_middle::bug;
8181
pub(crate) use rustc_middle::mir::{self, *};
82-
pub(crate) use rustc_middle::ty::layout::{self, TyAndLayout};
82+
pub(crate) use rustc_middle::ty::layout::{self, LayoutOf, TyAndLayout};
8383
pub(crate) use rustc_middle::ty::{
8484
self, FloatTy, Instance, InstanceDef, IntTy, ParamEnv, Ty, TyCtxt, TypeAndMut,
8585
TypeFoldable, UintTy,
8686
};
87-
pub(crate) use rustc_target::abi::{Abi, LayoutOf, Scalar, Size, VariantIdx};
87+
pub(crate) use rustc_target::abi::{Abi, Scalar, Size, VariantIdx};
8888

8989
pub(crate) use rustc_data_structures::fx::FxHashMap;
9090

0 commit comments

Comments
 (0)