mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
a8d66d4670
rustc_parse_format: improve error for missing `:` before `?` in format args
Detect the `{ident?}` pattern where `?` is immediately followed by `}` and emit a clearer diagnostic explaining that `:` is required for Debug formatting. This avoids falling back to a generic “invalid format string” error and adds a targeted UI test for the case.