]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/default-struct-update.rs
Rollup merge of #102215 - alexcrichton:wasm-link-whole-archive, r=estebank
[rust.git] / src / test / ui / async-await / default-struct-update.rs
1 // build-pass
2 // edition:2018
3 // compile-flags: -Zdrop-tracking=y
4
5 fn main() {
6     let _ = foo();
7 }
8
9 async fn from_config(_: Config) {}
10
11 async fn foo() {
12     from_config(Config {
13         nickname: None,
14         ..Default::default()
15     })
16     .await;
17 }
18
19 #[derive(Default)]
20 struct Config {
21     nickname: Option<Box<u8>>,
22 }