mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Merge visit_assoc_item
This commit is contained in:
@@ -1434,7 +1434,7 @@ pub(crate) fn brg_visit_block(&mut self, block: &'a Block) {
|
||||
self.parent_scope.macro_rules = orig_current_macro_rules_scope;
|
||||
}
|
||||
|
||||
fn visit_assoc_item(&mut self, item: &'a AssocItem, ctxt: AssocCtxt) {
|
||||
pub(crate) fn brg_visit_assoc_item(&mut self, item: &'a AssocItem, ctxt: AssocCtxt) {
|
||||
let (ident, ns) = match item.kind {
|
||||
AssocItemKind::Const(box ConstItem { ident, .. })
|
||||
| AssocItemKind::Fn(box Fn { ident, .. })
|
||||
|
||||
@@ -380,7 +380,9 @@ fn visit_assoc_item(&mut self, i: &'a AssocItem, ctxt: visit::AssocCtxt) {
|
||||
),
|
||||
AssocItemKind::Type(box TyAlias { ident, .. }) => (*ident, DefKind::AssocTy),
|
||||
AssocItemKind::MacCall(..) => {
|
||||
return self.visit_macro_invoc(i.id);
|
||||
self.visit_macro_invoc(i.id);
|
||||
self.brg_visit_assoc_item(i, ctxt);
|
||||
return;
|
||||
}
|
||||
AssocItemKind::DelegationMac(..) => {
|
||||
span_bug!(i.span, "degation mac invoc should have already been handled")
|
||||
@@ -388,7 +390,7 @@ fn visit_assoc_item(&mut self, i: &'a AssocItem, ctxt: visit::AssocCtxt) {
|
||||
};
|
||||
|
||||
let def = self.create_def(i.id, Some(ident.name), def_kind, i.span);
|
||||
self.with_parent(def, |this| visit::walk_assoc_item(this, i, ctxt));
|
||||
self.with_parent(def, |this| this.brg_visit_assoc_item(i, ctxt));
|
||||
}
|
||||
|
||||
fn visit_pat(&mut self, pat: &'a Pat) {
|
||||
|
||||
Reference in New Issue
Block a user