summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/next-solver/structural-resolve-field.rs
blob: b247e237534a67a644abcc08e82b874410b52b32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// compile-flags: -Znext-solver
// check-pass

#[derive(Default)]
struct Foo {
    x: i32,
}

fn main() {
    let mut xs = <[Foo; 1]>::default();
    xs[0].x = 1;
    (&mut xs[0]).x = 2;
}