Commit Graph

11 Commits

Author SHA1 Message Date
bors
a90372c6e8 Auto merge of #118213 - Urgau:check-cfg-diagnostics-rustc-cargo, r=petrochenkov
Add more suggestions to unexpected cfg names and values

This pull request adds more suggestion to unexpected cfg names and values diagnostics:
 - it first adds a links to the [rustc unstable book](https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html) or the [Cargo reference](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg), depending if rustc is invoked by Cargo
 - it secondly adds a suggestion on how to expect the cfg name or value:
    *excluding well known names and values*
    - for Cargo: it suggest using a feature or `cargo:rust-check-cfg` in build script
    - for rustc: it suggest using `--check-cfg` (with the correct invocation)

Those diagnostics improvements are directed towards enabling users to fix the issue if the previous suggestions weren't good enough.

r? `@petrochenkov`
2023-12-13 19:45:57 +00:00
Urgau
5345a166fe Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
Guillaume Gomez
bb0fd665a8 Follow guidelines for lint suggestions 2023-12-12 15:43:20 +01:00
Nilstrieb
9b80d85722 Manual find replace updates 2023-11-24 21:04:51 +01:00
Nilstrieb
87a354b15d Bless rustdoc-ui tests
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Urgau
fc78d78988 MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
Urgau
ed922d8c72 check-cfg: update rustdoc ui check-cfg tests 2023-10-12 18:39:35 +02:00
Yuri Astrakhan
2c5ecf22a2 Fix windows test output. 2023-08-01 14:24:11 +02:00
Mara Bos
0e729404da Change default panic handler message format. 2023-07-29 11:42:50 +02:00
Urgau
a5f8dba4cd Improve check-cfg diagnostics (part 1) 2023-05-05 13:06:48 +02:00
jyn
5fa975142f Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00