about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-04-28 20:21:03 +0000
committerMichael Goulet <michael@errs.io>2023-04-28 20:21:03 +0000
commit4e05cfb5ff5f6c27cc02ca76f7c4809c310371a4 (patch)
tree29485d7f0339074489f90a2b2c88f6c2676c7fa9 /compiler/rustc_resolve/src
parent43a78029b4f4d92978b8fde0a677ea300b113c41 (diff)
downloadrust-4e05cfb5ff5f6c27cc02ca76f7c4809c310371a4.tar.gz
rust-4e05cfb5ff5f6c27cc02ca76f7c4809c310371a4.zip
Don't duplicate anonymous lifetimes for async fn in traits
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/late.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs
index a97857e05e2..5c02e7193a2 100644
--- a/compiler/rustc_resolve/src/late.rs
+++ b/compiler/rustc_resolve/src/late.rs
@@ -859,13 +859,9 @@ impl<'a: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast,
                             sig.decl.inputs.iter().map(|Param { ty, .. }| (None, &**ty)),
                             &sig.decl.output,
                         );
-
-                        this.record_lifetime_params_for_async(
-                            fn_id,
-                            sig.header.asyncness.opt_return_id(),
-                        );
                     },
                 );
+                self.record_lifetime_params_for_async(fn_id, sig.header.asyncness.opt_return_id());
                 return;
             }
             FnKind::Fn(..) => {