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
|
@ -1765,7 +1765,7 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
|
|||
};
|
||||
|
||||
for (index, layout) in variants.iter_enumerated() {
|
||||
let name = adt.variants[index].name;
|
||||
let name = adt.variant(index).name;
|
||||
write!(w, "<li><code>{name}</code>: ", name = name);
|
||||
write_size_of_layout(w, *layout, tag_size);
|
||||
writeln!(w, "</li>");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue