fn _shape_check(a: A) {
match a {
A::Kind1 => {}
}
}
where it generates an A::Variant => {} match arm for each variant of B, and that would fail to compile if B's variants weren't the same as A's. The error message wouldn't be great, but at least for the example you posted in the OP, it's possible.