Ignore paths from expansion in unused_qualifications
This commit is contained in:
parent
c86f3ac24f
commit
a8452461dc
3 changed files with 5 additions and 1 deletions
|
@ -4672,7 +4672,9 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if path.iter().any(|seg| seg.ident.span.from_expansion()) {
|
if finalize.path_span.from_expansion()
|
||||||
|
|| path.iter().any(|seg| seg.ident.span.from_expansion())
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ fn main() {
|
||||||
foo::bar();
|
foo::bar();
|
||||||
foo::$b(); // issue #96698
|
foo::$b(); // issue #96698
|
||||||
$a::bar();
|
$a::bar();
|
||||||
|
$a::$b();
|
||||||
} }
|
} }
|
||||||
m!(foo, bar);
|
m!(foo, bar);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ fn main() {
|
||||||
foo::bar();
|
foo::bar();
|
||||||
foo::$b(); // issue #96698
|
foo::$b(); // issue #96698
|
||||||
$a::bar();
|
$a::bar();
|
||||||
|
$a::$b();
|
||||||
} }
|
} }
|
||||||
m!(foo, bar);
|
m!(foo, bar);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue