Mark an unreachable match arm as such

Synchronize which elements have code paths and which are unreachable betwen def collector and build reduced graph
This commit is contained in:
Oli Scherer
2026-03-10 13:51:41 +00:00
parent 98e7077b90
commit 40ac87e299
2 changed files with 7 additions and 2 deletions
@@ -1474,7 +1474,9 @@ fn visit_assoc_item(&mut self, item: &'a AssocItem, ctxt: AssocCtxt) {
return;
}
AssocItemKind::DelegationMac(..) => bug!(),
AssocItemKind::DelegationMac(..) => {
span_bug!(item.span, "delegation mac should already have been removed")
}
};
let vis = self.resolve_visibility(&item.vis);
let feed = self.r.feed(item.id);
+4 -1
View File
@@ -358,9 +358,12 @@ fn visit_assoc_item(&mut self, i: &'a AssocItem, ctxt: visit::AssocCtxt) {
},
),
AssocItemKind::Type(box TyAlias { ident, .. }) => (*ident, DefKind::AssocTy),
AssocItemKind::MacCall(..) | AssocItemKind::DelegationMac(..) => {
AssocItemKind::MacCall(..) => {
return self.visit_macro_invoc(i.id);
}
AssocItemKind::DelegationMac(..) => {
span_bug!(i.span, "degation mac invoc should have already been handled")
}
};
let def = self.create_def(i.id, Some(ident.name), def_kind, i.span);