]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #92835 - iwanders:issue-66450-improve-cfg-error-message, r=nagisa
authorMatthias Krüger <matthias.krueger@famsik.de>
Fri, 21 Jan 2022 21:03:14 +0000 (22:03 +0100)
committerGitHub <noreply@github.com>
Fri, 21 Jan 2022 21:03:14 +0000 (22:03 +0100)
commite38cbc78aa18354a8b4e1477cd090bd83c298ced
treee7af78ff9601cdcba2bd921c36afe4ee4f7a1f7c
parent701a8330e8ee2135137fa3fed5154e5d03945df9
parentaf87248037a8c86f580c469ce7d2a10c0b12f2fd
Rollup merge of #92835 - iwanders:issue-66450-improve-cfg-error-message, r=nagisa

Improve error message for key="value" cfg arguments.

Hi, I ran into difficulties using the `--cfg` flag syntax, first hit when googling for the error was issue https://github.com/rust-lang/rust/issues/66450. Reading that issue, it sounded like the best way to improve the experience was to improve the error message, this is low risk and doesn't introduce any additional argument parsing.

The issue mentions that it is entirely dependent on the shell, while this may be true, I think guiding the the user into the realization that the quotes may need to be escaped is helpful. The two suggested escapings both work in Bash and in the Windows command prompt.

fyi `@ehuss`