Sign in
rust
/
rust
/
HEAD
/
.
/
tests
/
ui
/
borrowck
/
borrowck-union-uninitialized.rs
blob: bbe9f22aac307c68a4ad094d2eba035a0902f589 [
file
] [
log
] [
blame
]
struct
S
{
a
:
u8
,
}
union U
{
a
:
u8
,
}
fn
main
()
{
unsafe
{
let
mut
s
:
S
;
let
mut
u
:
U
;
s
.
a
=
0
;
//~ ERROR E0381
u
.
a
=
0
;
//~ ERROR E0381
let
sa
=
s
.
a
;
let
ua
=
u
.
a
;
}
}