diff options
Diffstat (limited to 'tests/ui/generic-associated-types/bugs/issue-88460.rs')
-rw-r--r-- | tests/ui/generic-associated-types/bugs/issue-88460.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/bugs/issue-88460.rs b/tests/ui/generic-associated-types/bugs/issue-88460.rs new file mode 100644 index 000000000..224e696ad --- /dev/null +++ b/tests/ui/generic-associated-types/bugs/issue-88460.rs @@ -0,0 +1,29 @@ +// check-fail +// known-bug: #88460 + +// This should pass, but has a missed normalization due to HRTB. + +pub trait Marker {} + +pub trait Trait { + type Assoc<'a>; +} + +fn test<T>(value: T) +where + T: Trait, + for<'a> T::Assoc<'a>: Marker, +{ +} + +impl Marker for () {} + +struct Foo; + +impl Trait for Foo { + type Assoc<'a> = (); +} + +fn main() { + test(Foo); +} |