mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
16 lines
165 B
Rust
16 lines
165 B
Rust
|
// edition:2018
|
||
|
#![warn(clippy::unnecessary_async)]
|
||
|
|
||
|
async fn foo() -> i32 {
|
||
|
4
|
||
|
}
|
||
|
|
||
|
async fn bar() -> i32 {
|
||
|
foo().await
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
foo();
|
||
|
bar();
|
||
|
}
|