Description
Currently there is no check for a field of a struct to be in the struct itself. This check can (and should) be done with static semantics.
For example, this code should raise an error:
enum Message {
Move { x: i32, y: i32 },
}
fn main() {
let m = Message::Move {x : 1, y : 2};
if let Message::Move{ x: a, z: b} = m2{
println!("{}", a);
println!("{}", b);
}
}