Plumb dyn trait representation through ty::Dynamic
This commit is contained in:
@@ -63,7 +63,9 @@ use rustc_span::{Span, DUMMY_SP};
|
||||
use rustc_target::abi::{Layout, LayoutS, TargetDataLayout, VariantIdx};
|
||||
use rustc_target::spec::abi;
|
||||
use rustc_type_ir::sty::TyKind::*;
|
||||
use rustc_type_ir::{InternAs, InternIteratorElement, Interner, TypeFlags};
|
||||
use rustc_type_ir::{
|
||||
InternAs, InternIteratorElement, Interner, TraitObjectRepresentation, TypeFlags,
|
||||
};
|
||||
|
||||
use std::any::Any;
|
||||
use std::borrow::Borrow;
|
||||
@@ -2545,8 +2547,9 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||
self,
|
||||
obj: &'tcx List<ty::Binder<'tcx, ExistentialPredicate<'tcx>>>,
|
||||
reg: ty::Region<'tcx>,
|
||||
repr: TraitObjectRepresentation,
|
||||
) -> Ty<'tcx> {
|
||||
self.mk_ty(Dynamic(obj, reg))
|
||||
self.mk_ty(Dynamic(obj, reg, repr))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user