mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Add a regression test for issue 17199 that causes stack overflow
This commit is contained in:
parent
4e836c622a
commit
50b7678621
1 changed files with 19 additions and 0 deletions
|
@ -1999,3 +1999,22 @@ where
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn tait_async_stack_overflow_17199() {
|
||||||
|
check_types(
|
||||||
|
r#"
|
||||||
|
//- minicore: fmt, future
|
||||||
|
type Foo = impl core::fmt::Debug;
|
||||||
|
|
||||||
|
async fn foo() -> Foo {
|
||||||
|
()
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn test() {
|
||||||
|
let t = foo().await;
|
||||||
|
// ^ impl Debug
|
||||||
|
}
|
||||||
|
"#,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue