Sign in
fuchsia
/
third_party
/
rust
/
0.4
/
.
/
src
/
test
/
run-pass
/
writealias.rs
blob: eb3fa602f12ac78b0a12426ef71db0c808b478bc [
file
] [
log
] [
blame
]
// -*- rust -*-
type
point
=
{
x
:
int
,
y
:
int
,
mut
z
:
int
};
fn
f
(
p
:
&
mut
point
)
{
p
.
z
=
13
;
}
fn
main
()
{
let
mut
x
:
point
=
{
x
:
10
,
y
:
11
,
mut
z
:
12
};
f
(&
mut
x
);
assert
(
x
.
z
==
13
);
}