3 // Since we are testing nll migration explicitly as a separate
4 // revision, don't worry about the --compare-mode=nll on this test.
6 // ignore-compare-mode-nll
8 //[ast]compile-flags: -Z borrowck=ast
9 //[nll]compile-flags: -Z borrowck=migrate -Z two-phase-borrows
15 type Tuple = (S, i32);
17 struct Spair { x: S, y: i32 }
23 //[ast]~^ ERROR cannot assign to field `t.0` of immutable binding [E0594]
24 //[nll]~^^ ERROR assign to part of possibly uninitialized variable: `t` [E0381]
26 //[ast]~^ ERROR cannot assign to field `t.1` of immutable binding [E0594]
27 println!("{:?} {:?}", t.0, t.1);
28 //[ast]~^ ERROR use of possibly uninitialized variable: `t.0` [E0381]
29 //[ast]~| ERROR use of possibly uninitialized variable: `t.1` [E0381]
35 //[ast]~^ ERROR cannot assign to field `u.0` of immutable binding [E0594]
36 //[nll]~^^ ERROR assign to part of possibly uninitialized variable: `u` [E0381]
38 //[ast]~^ ERROR cannot assign to field `u.1` of immutable binding [E0594]
39 println!("{:?} {:?}", u.0, u.1);
40 //[ast]~^ ERROR use of possibly uninitialized variable: `u.0` [E0381]
41 //[ast]~| ERROR use of possibly uninitialized variable: `u.1` [E0381]
47 //[ast]~^ ERROR cannot assign to field `v.x` of immutable binding [E0594]
48 //[nll]~^^ ERROR assign to part of possibly uninitialized variable: `v` [E0381]
50 //[ast]~^ ERROR cannot assign to field `v.y` of immutable binding [E0594]
51 println!("{:?} {:?}", v.x, v.y);
52 //[ast]~^ ERROR use of possibly uninitialized variable: `v.x` [E0381]
53 //[ast]~| ERROR use of possibly uninitialized variable: `v.y` [E0381]