mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-02 17:44:28 +00:00
12 lines
303 B
Rust
12 lines
303 B
Rust
//! Ensure DataflowConstProp doesn't cause an error with async recursion as in #155376.
|
|
|
|
//@ edition:2018
|
|
//@ check-pass
|
|
//@ compile-flags: -Zmir-opt-level=0 -Zmir-enable-passes=+DataflowConstProp --crate-type=lib
|
|
|
|
pub async fn foo(n: usize) {
|
|
if n > 0 {
|
|
Box::pin(foo(n - 1)).await;
|
|
}
|
|
}
|