Skip to content

Commit 5634083

Browse files
committed
Use full paths in proc-macro.
1 parent 15e0627 commit 5634083

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

compiler/rustc_macros/src/visitable.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub(super) fn visitable_derive(mut s: synstructure::Structure<'_>) -> proc_macro
4747
if has_attr(bind, "ignore") {
4848
quote! {}
4949
} else {
50-
quote! { try_visit!(Visitable::visit(#bind, __visitor, (#extra))) }
50+
quote! { rustc_ast_ir::try_visit!(crate::visit::Visitable::visit(#bind, __visitor, (#extra))) }
5151
}
5252
});
5353

@@ -57,24 +57,23 @@ pub(super) fn visitable_derive(mut s: synstructure::Structure<'_>) -> proc_macro
5757
if has_attr(bind, "ignore") {
5858
quote! {}
5959
} else {
60-
quote! { MutVisitable::visit_mut(#bind, __visitor, (#extra)) }
60+
quote! { crate::mut_visit::MutVisitable::visit_mut(#bind, __visitor, (#extra)) }
6161
}
6262
});
6363

6464
s.gen_impl(quote! {
65-
use rustc_ast_ir::try_visit;
66-
use rustc_ast_ir::visit::VisitorResult;
67-
use crate::visit::{Visitable, Visitor, Walkable};
68-
use crate::mut_visit::{MutVisitor, MutVisitable, MutWalkable};
69-
70-
gen impl<'__ast, __V: Visitor<'__ast>> Walkable<'__ast, __V> for @Self {
65+
gen impl<'__ast, __V> crate::visit::Walkable<'__ast, __V> for @Self
66+
where __V: crate::visit::Visitor<'__ast>,
67+
{
7168
fn walk_ref(&'__ast self, __visitor: &mut __V) -> __V::Result {
7269
match *self { #ref_visit }
73-
<__V::Result as VisitorResult>::output()
70+
<__V::Result as rustc_ast_ir::visit::VisitorResult>::output()
7471
}
7572
}
7673

77-
gen impl<__V: MutVisitor> MutWalkable<__V> for @Self {
74+
gen impl<__V> crate::mut_visit::MutWalkable<__V> for @Self
75+
where __V: crate::mut_visit::MutVisitor,
76+
{
7877
fn walk_mut(&mut self, __visitor: &mut __V) {
7978
match *self { #mut_visit }
8079
}

0 commit comments

Comments
 (0)