diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-13 07:36:45 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-07-26 19:00:30 +0200 |
| commit | a2254d5d7c57be00cc640c0f7a8e21b320e947aa (patch) | |
| tree | 016552dc2fb54b88a46be82da86354f9b954f72c | |
| parent | c9b31839b624345d59fda6e595b9abae71fcea13 (diff) | |
| download | rust-a2254d5d7c57be00cc640c0f7a8e21b320e947aa.tar.gz rust-a2254d5d7c57be00cc640c0f7a8e21b320e947aa.zip | |
Do not produce extra lifetime parameters when not needed.
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 9b5fd4ea6d1..bc5668bcec0 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -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 |
