blob: 8d040da1ef7cc625bf3e308574470f15b69048de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
struct X {
a: Box<u32>,
}
struct Y {
y: Box<u32>,
}
fn main() {
let a = 8;
let v2 = X { a }; //~ ERROR mismatched types [E0308]
let v3 = Y { y: a }; //~ ERROR mismatched types [E0308]
let v4 = Y { a }; //~ ERROR struct `Y` has no field named `a` [E0560]
}
|