summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/default-struct-update.rs
blob: 64fb6280dd7bb644bc62a8ff8ab82759a5ed747f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// build-pass
// edition:2018
// compile-flags: -Zdrop-tracking=y

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>>,
}