Lint elided lifetimes in path on the AST.

This commit is contained in:
Camille GILLOT
2022-03-10 23:12:35 +01:00
parent ca57bada05
commit a9e13fa553
24 changed files with 279 additions and 154 deletions

View File

@@ -521,11 +521,10 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
// while the current crate doesn't have a valid `crate_name`.
if crate_name != kw::Empty {
// `crate_name` should not be interpreted as relative.
module_path.push(Segment {
ident: Ident { name: kw::PathRoot, span: source.ident.span },
id: Some(self.r.next_node_id()),
has_generic_args: false,
});
module_path.push(Segment::from_ident_and_id(
Ident { name: kw::PathRoot, span: source.ident.span },
self.r.next_node_id(),
));
source.ident.name = crate_name;
}
if rename.is_none() {