about summary refs log tree commit diff
path: root/compiler/rustc_infer/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-02-18 07:35:37 +0000
committerbors <bors@rust-lang.org>2022-02-18 07:35:37 +0000
commitfeac2ecf1cae1dd0f56bed1cecc6e109c64b3d4f (patch)
tree2cc75b0e141a0f5497667d250993f9cc5e9d1a86 /compiler/rustc_infer/src
parentf838a425e3134d036a7d9632935111a569ac7446 (diff)
parent86d17b98f2dbb732049d9671c354903b19203b56 (diff)
downloadrust-feac2ecf1cae1dd0f56bed1cecc6e109c64b3d4f.tar.gz
rust-feac2ecf1cae1dd0f56bed1cecc6e109c64b3d4f.zip
Auto merge of #94088 - oli-obk:revert, r=jackh726
Revert #91403

fixes #94004

r? `@pnkfelix` `@cjgillot`
Diffstat (limited to 'compiler/rustc_infer/src')
-rw-r--r--compiler/rustc_infer/src/infer/opaque_types.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_infer/src/infer/opaque_types.rs b/compiler/rustc_infer/src/infer/opaque_types.rs
index e79ece9a4a4..e7dca94806c 100644
--- a/compiler/rustc_infer/src/infer/opaque_types.rs
+++ b/compiler/rustc_infer/src/infer/opaque_types.rs
@@ -276,7 +276,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
         debug!(?concrete_ty);
 
         let first_own_region = match opaque_defn.origin {
-            hir::OpaqueTyOrigin::FnReturn(..) => {
+            hir::OpaqueTyOrigin::FnReturn(..) | hir::OpaqueTyOrigin::AsyncFn(..) => {
                 // We lower
                 //
                 // fn foo<'l0..'ln>() -> impl Trait<'l0..'lm>
@@ -291,7 +291,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
             }
             // These opaque type inherit all lifetime parameters from their
             // parent, so we have to check them all.
-            hir::OpaqueTyOrigin::AsyncFn(..) | hir::OpaqueTyOrigin::TyAlias => 0,
+            hir::OpaqueTyOrigin::TyAlias => 0,
         };
 
         // For a case like `impl Foo<'a, 'b>`, we would generate a constraint