Closed
Description
struct X { a: i32, b: i32 }
#[allow(unused_variables)]
fn main() {
const DX: X = X { a: 0, b: 0 };
const X1: X = X { a: 1, ..DX }; // ok
let x2 = X { a: 1, b: 2, ..DX }; // ok
const X3: X = X { a: 1, b: 2, ..DX }; // error[E0016]
}
- It's weird that
X1
andx2
are allowed, but notX3
. - Even if that's intentional, the error message seems off.