Unnamed repository; edit this file 'description' to name the repository.
Add a new failing test that overflows stack
Shoyu Vanilla 2025-01-24
parent 1329e6b · commit 649e65c
-rw-r--r--crates/ide/src/hover/tests.rs37
1 files changed, 37 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs
index 014b751f95..8fe932e2df 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -10349,3 +10349,40 @@ macro_rules! str {
"#]],
);
}
+
+#[test]
+fn regression_19007() {
+ check(
+ 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$0 = self.field.foo();
+ }
+}
+ "#,
+ expect![
+ r#"
+ "#
+ ],
+ );
+}