mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
4b1f3926de
* Avoid query cycles in DataflowConstProp * Add -Zmir-opt-level=0 to the test
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;
|
|
}
|
|
}
|