make LayoutCx not generic

This commit is contained in:
Lukas Markeffsky
2024-09-15 21:59:51 +02:00
parent 13b5a4e43b
commit 16be6666d4
9 changed files with 42 additions and 71 deletions

View File

@@ -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;