Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/inlay_hints/bind_pat.rs')
-rw-r--r--crates/ide/src/inlay_hints/bind_pat.rs34
1 files changed, 34 insertions, 0 deletions
diff --git a/crates/ide/src/inlay_hints/bind_pat.rs b/crates/ide/src/inlay_hints/bind_pat.rs
index ab5464156f..01a1a4545c 100644
--- a/crates/ide/src/inlay_hints/bind_pat.rs
+++ b/crates/ide/src/inlay_hints/bind_pat.rs
@@ -1206,4 +1206,38 @@ fn f5<G: T<Assoc = ()>>(it: G) {
"#,
);
}
+
+ #[test]
+ fn regression_19007() {
+ check_types(
+ r#"
+trait Foo {
+ type Assoc;
+
+ fn foo(&self) -> Self::Assoc;
+}
+
+trait Bar {
+ type Target;
+}
+
+trait Baz<T> {}
+
+struct Struct<T: Foo> {
+ field: T,
+}
+
+impl<T> Struct<T>
+where
+ T: Foo,
+ T::Assoc: Baz<<T::Assoc as Bar>::Target> + Bar,
+{
+ fn f(&self) {
+ let x = self.field.foo();
+ //^ impl Baz<<<T as Foo>::Assoc as Bar>::Target> + Bar
+ }
+}
+"#,
+ );
+ }
}