2023-04-23 14:58:24 -05:00
|
|
|
// compile-flags: -Ztrait-solver=next
|
|
|
|
// check-pass
|
|
|
|
|
2023-06-01 15:23:44 -05:00
|
|
|
#[derive(Default)]
|
2023-04-23 14:58:24 -05:00
|
|
|
struct Foo {
|
|
|
|
x: i32,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2023-06-01 15:23:44 -05:00
|
|
|
let mut xs = <[Foo; 1]>::default();
|
2023-04-23 14:58:24 -05:00
|
|
|
xs[0].x = 1;
|
|
|
|
(&mut xs[0]).x = 2;
|
|
|
|
}
|