Skip to content

Commit 1dc34ee

Browse files
committed
Add a new failing test that overflows stack
1 parent c3e88ae commit 1dc34ee

File tree

1 file changed

+37
-0
lines changed
  • src/tools/rust-analyzer/crates/ide/src/hover

1 file changed

+37
-0
lines changed

src/tools/rust-analyzer/crates/ide/src/hover/tests.rs

+37
Original file line numberDiff line numberDiff line change
@@ -10349,3 +10349,40 @@ macro_rules! str {
1034910349
"#]],
1035010350
);
1035110351
}
10352+
10353+
#[test]
10354+
fn regression_19007() {
10355+
check(
10356+
r#"
10357+
trait Foo {
10358+
type Assoc;
10359+
10360+
fn foo(&self) -> Self::Assoc;
10361+
}
10362+
10363+
trait Bar {
10364+
type Target;
10365+
}
10366+
10367+
trait Baz<T> {}
10368+
10369+
struct Struct<T: Foo> {
10370+
field: T,
10371+
}
10372+
10373+
impl<T> Struct<T>
10374+
where
10375+
T: Foo,
10376+
T::Assoc: Baz<<T::Assoc as Bar>::Target> + Bar,
10377+
{
10378+
fn f(&self) {
10379+
let x$0 = self.field.foo();
10380+
}
10381+
}
10382+
"#,
10383+
expect![
10384+
r#"
10385+
"#
10386+
],
10387+
);
10388+
}

0 commit comments

Comments
 (0)