1
Fork 0

rustc_target: require TyAbiInterface in LayoutOf.

This commit is contained in:
Eduard-Mihai Burtescu 2021-08-25 16:40:39 +03:00
parent 8486571a10
commit 87d1fb747f
4 changed files with 47 additions and 5 deletions

View file

@ -2034,6 +2034,20 @@ impl<'tcx> HasTyCtxt<'tcx> for TyCtxt<'tcx> {
}
}
impl<'tcx> HasDataLayout for ty::query::TyCtxtAt<'tcx> {
#[inline]
fn data_layout(&self) -> &TargetDataLayout {
&self.data_layout
}
}
impl<'tcx> HasTyCtxt<'tcx> for ty::query::TyCtxtAt<'tcx> {
#[inline]
fn tcx(&self) -> TyCtxt<'tcx> {
**self
}
}
impl<'tcx, C> HasParamEnv<'tcx> for LayoutCx<'tcx, C> {
fn param_env(&self) -> ty::ParamEnv<'tcx> {
self.param_env