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