Do not produce extra lifetime parameters when not needed.

This commit is contained in:
Camille GILLOT 2022-06-13 07:36:45 +02:00
parent c9b31839b6
commit a2254d5d7c

View File

@ -1632,6 +1632,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
| PathSource::Struct
| PathSource::TupleStruct(..) => false,
};
if !missing && !segment.has_generic_args {
continue;
}
let elided_lifetime_span = if segment.has_generic_args {
// If there are brackets, but not generic arguments, then use the opening bracket