rustc_target: move LayoutOf
to ty::layout
.
This commit is contained in:
parent
50171c310c
commit
4ce933f13f
51 changed files with 148 additions and 170 deletions
|
@ -31,7 +31,7 @@ use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData};
|
|||
use rustc_middle::lint::LintDiagnosticBuilder;
|
||||
use rustc_middle::middle::privacy::AccessLevels;
|
||||
use rustc_middle::middle::stability;
|
||||
use rustc_middle::ty::layout::{LayoutError, TyAndLayout};
|
||||
use rustc_middle::ty::layout::{LayoutError, LayoutOf, TyAndLayout};
|
||||
use rustc_middle::ty::print::with_no_trimmed_paths;
|
||||
use rustc_middle::ty::{self, print::Printer, subst::GenericArg, Ty, TyCtxt};
|
||||
use rustc_serialize::json::Json;
|
||||
|
@ -41,7 +41,7 @@ use rustc_session::Session;
|
|||
use rustc_session::SessionLintStore;
|
||||
use rustc_span::lev_distance::find_best_match_for_name;
|
||||
use rustc_span::{symbol::Symbol, MultiSpan, Span, DUMMY_SP};
|
||||
use rustc_target::abi::{self, LayoutOf};
|
||||
use rustc_target::abi;
|
||||
use tracing::debug;
|
||||
|
||||
use std::cell::Cell;
|
||||
|
@ -1081,10 +1081,9 @@ impl<'tcx> ty::layout::HasParamEnv<'tcx> for LateContext<'tcx> {
|
|||
}
|
||||
|
||||
impl<'tcx> LayoutOf<'tcx> for LateContext<'tcx> {
|
||||
type Ty = Ty<'tcx>;
|
||||
type TyAndLayout = Result<TyAndLayout<'tcx>, LayoutError<'tcx>>;
|
||||
type LayoutOfResult = Result<TyAndLayout<'tcx>, LayoutError<'tcx>>;
|
||||
|
||||
fn layout_of(&self, ty: Ty<'tcx>) -> Self::TyAndLayout {
|
||||
fn layout_of(&self, ty: Ty<'tcx>) -> Self::LayoutOfResult {
|
||||
self.tcx.layout_of(self.param_env.and(ty))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue