about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2023-05-08 11:39:22 +0530
committerGitHub <noreply@github.com>2023-05-08 11:39:22 +0530
commit940567068c2da9eceec21239e7aad75ad20b0b4e (patch)
treeb137bfc2d1e10644187b136bcf3567b931ecc2b5
parentc9433a49699926d60a89c41530c3abf91511ec06 (diff)
parentf2cf795af444792500c156487e71e4a4298de95c (diff)
Rollup merge of #111265 - spastorino:has_self-opaque_ty, r=compiler-errors
Make generics_of has_self on RPITITs delegate to the opaque

r? `@compiler-errors`

I couldn't come up with a test case and none of the ones in the `tests` folder is impacted by this change, but I still think is the right thing to do.

Michael, let me know if you have ideas on how to add a test that's affected by this change.
-rw-r--r--compiler/rustc_ty_utils/src/assoc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ty_utils/src/assoc.rs b/compiler/rustc_ty_utils/src/assoc.rs
index de1e1a527d5..9029ba2a51a 100644
--- a/compiler/rustc_ty_utils/src/assoc.rs
+++ b/compiler/rustc_ty_utils/src/assoc.rs
@@ -334,7 +334,7 @@ fn associated_type_for_impl_trait_in_trait(
             parent_count,
             params,
             param_def_id_to_index,
-            has_self: false,
+            has_self: opaque_ty_generics.has_self,
             has_late_bound_regions: opaque_ty_generics.has_late_bound_regions,
         }
     });