about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
diff options
context:
space:
mode:
authorShoyu Vanilla <modulo641@gmail.com>2025-01-24 23:06:02 +0900
committerShoyu Vanilla <modulo641@gmail.com>2025-01-24 23:06:02 +0900
commit1dc34eeb99c6c59de51ebe37c7680cfdc764c30d (patch)
tree423254698d839f0ac8b1a4fc788c00e14ad5db86 /src/tools/rust-analyzer
parentc3e88ae1c6f55e12cbbb6b4d0d4f68a3ed3b801a (diff)
downloadrust-1dc34eeb99c6c59de51ebe37c7680cfdc764c30d.tar.gz
rust-1dc34eeb99c6c59de51ebe37c7680cfdc764c30d.zip
Add a new failing test that overflows stack
Diffstat (limited to 'src/tools/rust-analyzer')
-rw-r--r--src/tools/rust-analyzer/crates/ide/src/hover/tests.rs37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/crates/ide/src/hover/tests.rs b/src/tools/rust-analyzer/crates/ide/src/hover/tests.rs
index 014b751f95b..8fe932e2df1 100644
--- a/src/tools/rust-analyzer/crates/ide/src/hover/tests.rs
+++ b/src/tools/rust-analyzer/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#"
+        "#
+        ],
+    );
+}