From db3a0e5769a5340b9e9a5c7a6817af335cbe6b67 Mon Sep 17 00:00:00 2001 From: Lucas Sunsi Abreu Date: Fri, 11 Sep 2026 11:10:35 -0300 Subject: [PATCH] Add regression test for matching associated types on new solver --- .../associated-types-match-despite-generic.rs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/ui/associated-types/associated-types-match-despite-generic.rs diff --git a/tests/ui/associated-types/associated-types-match-despite-generic.rs b/tests/ui/associated-types/associated-types-match-despite-generic.rs new file mode 100644 index 0000000000000..04fc374e59a0c --- /dev/null +++ b/tests/ui/associated-types/associated-types-match-despite-generic.rs @@ -0,0 +1,21 @@ +//! Regression test for . +//@compile-flags: -Znext-solver=globally +//@ check-pass + +struct Outer; +struct Inner; +trait Id { + type This; +} +impl Id for T { + type This = T; +} + +fn free(x: T) -> >::This +where + >::This: Id>::This>, +{ + x +} + +fn main() {}