Improve AdtDef
interning.
This commit makes `AdtDef` use `Interned`. Much the commit is tedious changes to introduce getter functions. The interesting changes are in `compiler/rustc_middle/src/ty/adt.rs`.
This commit is contained in:
parent
5f4e067719
commit
ca5525d564
169 changed files with 702 additions and 687 deletions
|
@ -67,7 +67,7 @@ fn clif_type_from_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<types::Typ
|
|||
pointer_ty(tcx)
|
||||
}
|
||||
}
|
||||
ty::Adt(adt_def, _) if adt_def.repr.simd() => {
|
||||
ty::Adt(adt_def, _) if adt_def.repr().simd() => {
|
||||
let (element, count) = match &tcx.layout_of(ParamEnv::reveal_all().and(ty)).unwrap().abi
|
||||
{
|
||||
Abi::Vector { element, count } => (element.clone(), *count),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue