diff options
Diffstat (limited to 'src/test/ui/generic-associated-types/bugs/issue-88460.rs')
-rw-r--r-- | src/test/ui/generic-associated-types/bugs/issue-88460.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/ui/generic-associated-types/bugs/issue-88460.rs b/src/test/ui/generic-associated-types/bugs/issue-88460.rs new file mode 100644 index 000000000..f1c3b2269 --- /dev/null +++ b/src/test/ui/generic-associated-types/bugs/issue-88460.rs @@ -0,0 +1,31 @@ +// check-fail +// known-bug: #88460 + +// This should pass, but has a missed normalization due to HRTB. + +#![feature(generic_associated_types)] + +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); +} |