Skip to content

Commit a2254d5

Browse files
committed
Do not produce extra lifetime parameters when not needed.
1 parent c9b3183 commit a2254d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_resolve/src/late.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1632,6 +1632,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
16321632
| PathSource::Struct
16331633
| PathSource::TupleStruct(..) => false,
16341634
};
1635+
if !missing && !segment.has_generic_args {
1636+
continue;
1637+
}
16351638

16361639
let elided_lifetime_span = if segment.has_generic_args {
16371640
// If there are brackets, but not generic arguments, then use the opening bracket

0 commit comments

Comments
 (0)