diff options
| author | y21 <30553356+y21@users.noreply.github.com> | 2023-08-30 22:08:05 +0200 |
|---|---|---|
| committer | y21 <30553356+y21@users.noreply.github.com> | 2023-08-30 22:08:05 +0200 |
| commit | 563abf965145afe2ad9468622ad310dcb9ad4e40 (patch) | |
| tree | 4fbc6f6e5a323c19bfd40e8d80a6158cea8fe6f0 /tests/ui/implied_bounds_in_impls.fixed | |
| parent | b97eaab558bd37f665b10a79fd5aecea3dde920f (diff) | |
[`implied_bounds_in_impls`]: move to nursery and fix ICEs
Diffstat (limited to 'tests/ui/implied_bounds_in_impls.fixed')
| -rw-r--r-- | tests/ui/implied_bounds_in_impls.fixed | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/implied_bounds_in_impls.fixed b/tests/ui/implied_bounds_in_impls.fixed index 952c2b70619..69fcc8921d6 100644 --- a/tests/ui/implied_bounds_in_impls.fixed +++ b/tests/ui/implied_bounds_in_impls.fixed @@ -65,4 +65,22 @@ impl SomeTrait for SomeStruct { } } +mod issue11422 { + use core::fmt::Debug; + // Some additional tests that would cause ICEs: + + // `PartialOrd` has a default generic parameter and does not need to be explicitly specified. + // This needs special handling. + fn default_generic_param1() -> impl PartialOrd + Debug {} + fn default_generic_param2() -> impl PartialOrd + Debug {} + + // Referring to `Self` in the supertrait clause needs special handling. + trait Trait1<X: ?Sized> {} + trait Trait2: Trait1<Self> {} + impl Trait1<()> for () {} + impl Trait2 for () {} + + fn f() -> impl Trait1<()> + Trait2 {} +} + fn main() {} |
