mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-06 20:27:48 +00:00

Previously it was not clear why this errored or if it was even supported, as there was no diagnostic that suggested wrapping it in braces. Thus, add a simple diagnostic that suggests wrapping enum variants in braces.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.