mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Add a new failing test that overflows stack
This commit is contained in:
parent
1329e6be49
commit
649e65ce1e
@ -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#"
|
||||
"#
|
||||
],
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user