aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/writealias.rs
blob: 96b2a9d7f330932fce9077fac5cab2d431300cc9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
// -*- rust -*-

type point = rec(int x, int y, mutable int z);

fn f(mutable &point p) {
  p.z = 13;
}

fn main() {
  let point x = rec(x=10, y=11, z=mutable 12);
  f(x);
  check (x.z == 13);
}