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
|
@ -247,7 +247,7 @@ impl<'tcx> Ty<'tcx> {
|
|||
}
|
||||
ty::Tuple(ref tys) if tys.is_empty() => format!("`{}`", self).into(),
|
||||
|
||||
ty::Adt(def, _) => format!("{} `{}`", def.descr(), tcx.def_path_str(def.did)).into(),
|
||||
ty::Adt(def, _) => format!("{} `{}`", def.descr(), tcx.def_path_str(def.did())).into(),
|
||||
ty::Foreign(def_id) => format!("extern type `{}`", tcx.def_path_str(def_id)).into(),
|
||||
ty::Array(t, n) => {
|
||||
if t.is_simple_ty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue