about summary refs log tree commit diff
path: root/tests/ui/async-await/default-struct-update.rs
blob: 8011404ed11bb4308dd3ff6cafeb0dab3d761f5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//@ 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>>,
}