mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-01 15:50:05 +03:00
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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user