mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
22 lines
288 B
Rust
22 lines
288 B
Rust
//@ build-pass
|
|
//@ edition:2018
|
|
|
|
fn main() {
|
|
let _ = foo();
|
|
}
|
|
|
|
async fn from_config(_: Config) {}
|
|
|
|
async fn foo() {
|
|
from_config(Config {
|
|
nickname: None,
|
|
..Default::default()
|
|
})
|
|
.await;
|
|
}
|
|
|
|
#[derive(Default)]
|
|
struct Config {
|
|
nickname: Option<Box<u8>>,
|
|
}
|