mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
772f42b5b7
compiletest: Enforce that directives are consistently used with or without a colon With the notable exception of `//@ pp-exact`, all directives expect to either always be used *with* a colon, or always be used *without* a colon. For example: - `//@ uses-colon: value` - `//@ no-colon` or `//@ no-colon (remark)` Currently we just silently discard directives that use the wrong syntax, which is not great. This PR therefore makes `parse_name_directive` and `parse_name_value_directive` panic if the wrong syntax is encountered. The parser for `pp-exact` has been adjusted to check for the colon before deciding which parse method to call. r? jieyouxu