Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
async-await
/
default-struct-update.rs
blob: 8011404ed11bb4308dd3ff6cafeb0dab3d761f5d [
file
] [
log
] [
blame
] [
edit
]
//@ 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
>>,
}