diff --git a/tests/ui/generic-associated-types/trait-method-requires-gat-impl-trait.rs b/tests/ui/generic-associated-types/trait-method-requires-gat-impl-trait.rs new file mode 100644 index 0000000000000..3477f579cd0dd --- /dev/null +++ b/tests/ui/generic-associated-types/trait-method-requires-gat-impl-trait.rs @@ -0,0 +1,17 @@ +//! Regression test for . +//@compile-flags: -Znext-solver=globally +//@ check-pass + +trait Trait { + type Assoc; + fn foo() + where + Self::Assoc: Trait; +} + +impl Trait for T { + type Assoc = T; + fn foo() {} +} + +fn main() {}