mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rollup merge of #153659 - oli-obk:brg_dc_merge_prelude, r=petrochenkov
Mark an unreachable match arm as such Synchronize which elements have code paths and which are unreachable betwen def collector and build reduced graph. Found while analyzing on how to best merge these two visitors in a reviewable way r? @petrochenkov
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