Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dario23 committed May 6, 2022
1 parent 1aff824 commit e35c56f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NOTE: Keep in sync with nightly date on README
[toolchain]
channel = "nightly-2022-01-10"
channel = "nightly-2022-01-13"
components = ["llvm-tools-preview", "rustc-dev"]
20 changes: 16 additions & 4 deletions src/traverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,22 +429,34 @@ fn diff_adts(changes: &mut ChangeSet, id_mapping: &mut IdMapping, tcx: TyCtxt, o
let mut fields = BTreeMap::new();

for variant in &old_def.variants {
variants.entry(variant.ident.name).or_insert((None, None)).0 = Some(variant);
variants
.entry(variant.ident(tcx).name)
.or_insert((None, None))
.0 = Some(variant);
}

for variant in &new_def.variants {
variants.entry(variant.ident.name).or_insert((None, None)).1 = Some(variant);
variants
.entry(variant.ident(tcx).name)
.or_insert((None, None))
.1 = Some(variant);
}

for items in variants.values() {
match *items {
(Some(old), Some(new)) => {
for field in &old.fields {
fields.entry(field.ident.name).or_insert((None, None)).0 = Some(field);
fields
.entry(field.ident(tcx).name)
.or_insert((None, None))
.0 = Some(field);
}

for field in &new.fields {
fields.entry(field.ident.name).or_insert((None, None)).1 = Some(field);
fields
.entry(field.ident(tcx).name)
.or_insert((None, None))
.1 = Some(field);
}

let mut total_private = true;
Expand Down

0 comments on commit e35c56f

Please sign in to comment.