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