ty::layout: split LayoutOf into required and (blanket) provided halves.

This commit is contained in:
Eduard-Mihai Burtescu 2021-08-30 20:37:36 +03:00
parent 6a9c9b0f18
commit dc6c4defdc

View file

@ -1,5 +1,5 @@
use rustc_index::vec::IndexVec;
use rustc_middle::ty::layout::LayoutError;
use rustc_middle::ty::layout::{LayoutError, LayoutOfHelpers};
use rustc_middle::ty::SymbolName;
use rustc_target::abi::call::FnAbi;
use rustc_target::abi::{Integer, Primitive};
@ -257,7 +257,7 @@ pub(crate) struct FunctionCx<'m, 'clif, 'tcx: 'm> {
pub(crate) inline_asm_index: u32,
}
impl<'tcx> LayoutOf<'tcx> for FunctionCx<'_, '_, 'tcx> {
impl<'tcx> LayoutOfHelpers<'tcx> for FunctionCx<'_, '_, 'tcx> {
type LayoutOfResult = TyAndLayout<'tcx>;
#[inline]
@ -365,7 +365,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
pub(crate) struct RevealAllLayoutCx<'tcx>(pub(crate) TyCtxt<'tcx>);
impl<'tcx> LayoutOf<'tcx> for RevealAllLayoutCx<'tcx> {
impl<'tcx> LayoutOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {
type LayoutOfResult = TyAndLayout<'tcx>;
#[inline]