2019-08-06 11:54:30 -05:00
|
|
|
// edition:2018
|
|
|
|
// compile-flags: --crate-type lib
|
|
|
|
|
|
|
|
async fn no_non_guaranteed_initialization(x: usize) -> usize {
|
|
|
|
let y;
|
|
|
|
if x > 5 {
|
|
|
|
y = echo(10).await;
|
|
|
|
}
|
2022-06-21 13:57:45 -05:00
|
|
|
y //~ ERROR E0381
|
2019-08-06 11:54:30 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
async fn echo(x: usize) -> usize { x + 1 }
|