Skip to content

Commit d287f3e

Browse files
committedMay 6, 2024
Auto merge of #124784 - matthiaskrgr:rollup-e9pg3v4, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - #124742 (Add `rustfmt` cfg to well known cfgs list) - #124765 ([rustdoc] Fix bad color for setting cog in ayu theme) - #124768 ([resubmission] Meta: Enable the brand new triagebot transfer command) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 96f1da8 + 78ee4ce commit d287f3e

24 files changed

+97
-38
lines changed
 

‎compiler/rustc_session/src/config/cfg.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,15 @@ impl CheckCfg {
262262

263263
ins!(sym::debug_assertions, no_values);
264264

265-
// These four are never set by rustc, but we set them anyway: they
266-
// should not trigger a lint because `cargo clippy`, `cargo doc`,
267-
// `cargo test` and `cargo miri run` (respectively) can set them.
265+
// These four are never set by rustc, but we set them anyway; they
266+
// should not trigger the lint because `cargo clippy`, `cargo doc`,
267+
// `cargo test`, `cargo miri run` and `cargo fmt` (respectively)
268+
// can set them.
268269
ins!(sym::clippy, no_values);
269270
ins!(sym::doc, no_values);
270271
ins!(sym::doctest, no_values);
271272
ins!(sym::miri, no_values);
273+
ins!(sym::rustfmt, no_values);
272274

273275
ins!(sym::overflow_checks, no_values);
274276

‎src/doc/rustc/src/check-cfg.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Those well known names and values follows the same stability as what they refer
7171
Well known names and values checking is always enabled as long as at least one
7272
`--check-cfg` argument is present.
7373
74-
As of `2024-04-06T`, the list of known names is as follows:
74+
As of `2024-05-06T`, the list of known names is as follows:
7575
7676
<!--- See CheckCfg::fill_well_known in compiler/rustc_session/src/config.rs -->
7777
@@ -84,6 +84,7 @@ As of `2024-04-06T`, the list of known names is as follows:
8484
- `panic`
8585
- `proc_macro`
8686
- `relocation_model`
87+
- `rustfmt`
8788
- `sanitize`
8889
- `sanitizer_cfi_generalize_pointers`
8990
- `sanitizer_cfi_normalize_integers`

‎src/librustdoc/html/static/css/noscript.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ nav.sub {
8585
--search-tab-button-not-selected-background: #e6e6e6;
8686
--search-tab-button-selected-border-top-color: #0089ff;
8787
--search-tab-button-selected-background: #fff;
88+
--settings-menu-filter: none;
8889
--stab-background-color: #fff5d6;
8990
--stab-code-color: #000;
9091
--code-highlight-kw-color: #8959a8;

‎src/librustdoc/html/static/css/rustdoc.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,7 @@ a.tooltip:hover::after {
16251625
,5.1715698,7.5,6 S6.8284302,7.5,6,7.5z" fill="black"/></svg>');
16261626
width: 22px;
16271627
height: 22px;
1628+
filter: var(--settings-menu-filter);
16281629
}
16291630

16301631
#sidebar-button > a:before {
@@ -2419,6 +2420,7 @@ by default.
24192420
--search-tab-button-not-selected-background: #e6e6e6;
24202421
--search-tab-button-selected-border-top-color: #0089ff;
24212422
--search-tab-button-selected-background: #fff;
2423+
--settings-menu-filter: none;
24222424
--stab-background-color: #fff5d6;
24232425
--stab-code-color: #000;
24242426
--code-highlight-kw-color: #8959a8;
@@ -2524,6 +2526,7 @@ by default.
25242526
--search-tab-button-not-selected-background: #252525;
25252527
--search-tab-button-selected-border-top-color: #0089ff;
25262528
--search-tab-button-selected-background: #353535;
2529+
--settings-menu-filter: none;
25272530
--stab-background-color: #314559;
25282531
--stab-code-color: #e6e1cf;
25292532
--code-highlight-kw-color: #ab8ac1;
@@ -2636,6 +2639,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
26362639
--search-tab-button-not-selected-background: transparent !important;
26372640
--search-tab-button-selected-border-top-color: none;
26382641
--search-tab-button-selected-background: #141920 !important;
2642+
--settings-menu-filter: invert(100%);
26392643
--stab-background-color: #314559;
26402644
--stab-code-color: #e6e1cf;
26412645
--code-highlight-kw-color: #ff7733;
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// This test ensures that the icon of the settings button looks as expected on
2+
// all themes.
3+
include: "utils.goml"
4+
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
5+
show-text: true
6+
7+
define-function: (
8+
"check-image",
9+
[theme, filter],
10+
block {
11+
call-function: ("switch-theme", {"theme": |theme|})
12+
assert-css: ("#settings-menu > a::before", {
13+
"filter": |filter|,
14+
"width": "22px",
15+
"height": "22px",
16+
})
17+
}
18+
)
19+
20+
call-function: ("check-image", {
21+
"theme": "ayu",
22+
"filter": "invert(1)",
23+
})
24+
call-function: ("check-image", {
25+
"theme": "dark",
26+
"filter": "none",
27+
})
28+
call-function: ("check-image", {
29+
"theme": "light",
30+
"filter": "none",
31+
})

‎tests/rustdoc-gui/settings.goml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// This test ensures that the settings menu display is working as expected and that
22
// the settings page is also rendered as expected.
3-
include: "utils.goml"
43
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
54
show-text: true // needed when we check for colors below.
65
// First, we check that the settings page doesn't exist.

‎tests/rustdoc-gui/src/theme_css/custom-theme.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
--search-tab-button-not-selected-background: #e6e6e6;
5050
--search-tab-button-selected-border-top-color: #0089ff;
5151
--search-tab-button-selected-background: #fff;
52+
--settings-menu-filter: none;
5253
--stab-background-color: #fff5d6;
5354
--stab-code-color: #000;
5455
--code-highlight-kw-color: #8959a8;

‎tests/ui/check-cfg/allow-same-level.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `FALSE`
44
LL | #[cfg(FALSE)]
55
| ^^^^^
66
|
7-
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
7+
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(FALSE)`
99
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default

‎tests/ui/check-cfg/cargo-feature.none.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ warning: unexpected `cfg` condition name: `tokio_unstable`
2525
LL | #[cfg(tokio_unstable)]
2626
| ^^^^^^^^^^^^^^
2727
|
28-
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
28+
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
2929
= help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(tokio_unstable)");` to the top of the `build.rs`
3030
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
3131

‎tests/ui/check-cfg/cargo-feature.some.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ warning: unexpected `cfg` condition name: `tokio_unstable`
2525
LL | #[cfg(tokio_unstable)]
2626
| ^^^^^^^^^^^^^^
2727
|
28-
= help: expected names are: `CONFIG_NVME`, `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
28+
= help: expected names are: `CONFIG_NVME`, `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
2929
= help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(tokio_unstable)");` to the top of the `build.rs`
3030
= note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
3131

‎tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `value`
44
LL | #[cfg(value)]
55
| ^^^^^
66
|
7-
= help: expected names are: `bar`, `bee`, `clippy`, `cow`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
7+
= help: expected names are: `bar`, `bee`, `clippy`, `cow`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(value)`
99
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default

‎tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `my_value`
44
LL | #[cfg(my_value)]
55
| ^^^^^^^^
66
|
7-
= help: expected names are: `bar`, `clippy`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
7+
= help: expected names are: `bar`, `clippy`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(my_value)`
99
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default

‎tests/ui/check-cfg/cfg-value-for-cfg-name.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `linux`
44
LL | #[cfg(linux)]
55
| ^^^^^ help: found config with similar value: `target_os = "linux"`
66
|
7-
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
7+
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(linux)`
99
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default

‎tests/ui/check-cfg/compact-names.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `target_architecture`
44
LL | #[cfg(target(os = "linux", architecture = "arm"))]
55
| ^^^^^^^^^^^^^^^^^^^^
66
|
7-
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
7+
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(target_architecture, values("arm"))`
99
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default

‎tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `unknown_key`
44
LL | #[cfg(unknown_key = "value")]
55
| ^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
7+
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
99
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default

‎tests/ui/check-cfg/exhaustive-names-values.feature.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `unknown_key`
44
LL | #[cfg(unknown_key = "value")]
55
| ^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
7+
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
99
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default

‎tests/ui/check-cfg/exhaustive-names-values.full.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `unknown_key`
44
LL | #[cfg(unknown_key = "value")]
55
| ^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
7+
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
99
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default

‎tests/ui/check-cfg/exhaustive-names.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `unknown_key`
44
LL | #[cfg(unknown_key = "value")]
55
| ^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
7+
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))`
99
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default

‎tests/ui/check-cfg/mix.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ warning: unexpected `cfg` condition name: `uu`
4444
LL | #[cfg_attr(uu, test)]
4545
| ^^
4646
|
47-
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
47+
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
4848
= help: to expect this configuration use `--check-cfg=cfg(uu)`
4949
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
5050

‎tests/ui/check-cfg/stmt-no-ice.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name: `crossbeam_loom`
44
LL | #[cfg(crossbeam_loom)]
55
| ^^^^^^^^^^^^^^
66
|
7-
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
7+
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
88
= help: to expect this configuration use `--check-cfg=cfg(crossbeam_loom)`
99
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
1010
= note: `#[warn(unexpected_cfgs)]` on by default

‎tests/ui/check-cfg/well-known-names.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ warning: unexpected `cfg` condition name: `features`
1818
LL | #[cfg(features = "foo")]
1919
| ^^^^^^^^^^^^^^^^
2020
|
21-
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
21+
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
2222
= help: to expect this configuration use `--check-cfg=cfg(features, values("foo"))`
2323
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
2424

‎tests/ui/check-cfg/well-known-values.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
//~^ WARN unexpected `cfg` condition value
4444
relocation_model = "_UNEXPECTED_VALUE",
4545
//~^ WARN unexpected `cfg` condition value
46+
rustfmt = "_UNEXPECTED_VALUE",
47+
//~^ WARN unexpected `cfg` condition value
4648
sanitize = "_UNEXPECTED_VALUE",
4749
//~^ WARN unexpected `cfg` condition value
4850
target_abi = "_UNEXPECTED_VALUE",
@@ -115,4 +117,7 @@ fn doc() {}
115117
#[cfg(clippy)]
116118
fn clippy() {}
117119

120+
#[cfg_attr(rustfmt, rustfmt::skip)]
121+
fn rustfmt() {}
122+
118123
fn main() {}

‎tests/ui/check-cfg/well-known-values.stderr

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,25 @@ LL | relocation_model = "_UNEXPECTED_VALUE",
9797
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
9898
--> $DIR/well-known-values.rs:46:5
9999
|
100+
LL | rustfmt = "_UNEXPECTED_VALUE",
101+
| ^^^^^^^----------------------
102+
| |
103+
| help: remove the value
104+
|
105+
= note: no expected value for `rustfmt`
106+
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
107+
108+
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
109+
--> $DIR/well-known-values.rs:48:5
110+
|
100111
LL | sanitize = "_UNEXPECTED_VALUE",
101112
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102113
|
103114
= note: expected values for `sanitize` are: `address`, `cfi`, `dataflow`, `hwaddress`, `kcfi`, `kernel-address`, `leak`, `memory`, `memtag`, `safestack`, `shadow-call-stack`, `thread`
104115
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
105116

106117
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
107-
--> $DIR/well-known-values.rs:48:5
118+
--> $DIR/well-known-values.rs:50:5
108119
|
109120
LL | target_abi = "_UNEXPECTED_VALUE",
110121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -113,7 +124,7 @@ LL | target_abi = "_UNEXPECTED_VALUE",
113124
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
114125

115126
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
116-
--> $DIR/well-known-values.rs:50:5
127+
--> $DIR/well-known-values.rs:52:5
117128
|
118129
LL | target_arch = "_UNEXPECTED_VALUE",
119130
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -122,7 +133,7 @@ LL | target_arch = "_UNEXPECTED_VALUE",
122133
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
123134

124135
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
125-
--> $DIR/well-known-values.rs:52:5
136+
--> $DIR/well-known-values.rs:54:5
126137
|
127138
LL | target_endian = "_UNEXPECTED_VALUE",
128139
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -131,7 +142,7 @@ LL | target_endian = "_UNEXPECTED_VALUE",
131142
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
132143

133144
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
134-
--> $DIR/well-known-values.rs:54:5
145+
--> $DIR/well-known-values.rs:56:5
135146
|
136147
LL | target_env = "_UNEXPECTED_VALUE",
137148
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -140,7 +151,7 @@ LL | target_env = "_UNEXPECTED_VALUE",
140151
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
141152

142153
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
143-
--> $DIR/well-known-values.rs:56:5
154+
--> $DIR/well-known-values.rs:58:5
144155
|
145156
LL | target_family = "_UNEXPECTED_VALUE",
146157
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -149,7 +160,7 @@ LL | target_family = "_UNEXPECTED_VALUE",
149160
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
150161

151162
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
152-
--> $DIR/well-known-values.rs:58:5
163+
--> $DIR/well-known-values.rs:60:5
153164
|
154165
LL | target_feature = "_UNEXPECTED_VALUE",
155166
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -158,7 +169,7 @@ LL | target_feature = "_UNEXPECTED_VALUE",
158169
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
159170

160171
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
161-
--> $DIR/well-known-values.rs:60:5
172+
--> $DIR/well-known-values.rs:62:5
162173
|
163174
LL | target_has_atomic = "_UNEXPECTED_VALUE",
164175
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -167,7 +178,7 @@ LL | target_has_atomic = "_UNEXPECTED_VALUE",
167178
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
168179

169180
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
170-
--> $DIR/well-known-values.rs:62:5
181+
--> $DIR/well-known-values.rs:64:5
171182
|
172183
LL | target_has_atomic_equal_alignment = "_UNEXPECTED_VALUE",
173184
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -176,7 +187,7 @@ LL | target_has_atomic_equal_alignment = "_UNEXPECTED_VALUE",
176187
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
177188

178189
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
179-
--> $DIR/well-known-values.rs:64:5
190+
--> $DIR/well-known-values.rs:66:5
180191
|
181192
LL | target_has_atomic_load_store = "_UNEXPECTED_VALUE",
182193
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -185,7 +196,7 @@ LL | target_has_atomic_load_store = "_UNEXPECTED_VALUE",
185196
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
186197

187198
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
188-
--> $DIR/well-known-values.rs:66:5
199+
--> $DIR/well-known-values.rs:68:5
189200
|
190201
LL | target_os = "_UNEXPECTED_VALUE",
191202
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -194,7 +205,7 @@ LL | target_os = "_UNEXPECTED_VALUE",
194205
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
195206

196207
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
197-
--> $DIR/well-known-values.rs:68:5
208+
--> $DIR/well-known-values.rs:70:5
198209
|
199210
LL | target_pointer_width = "_UNEXPECTED_VALUE",
200211
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -203,7 +214,7 @@ LL | target_pointer_width = "_UNEXPECTED_VALUE",
203214
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
204215

205216
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
206-
--> $DIR/well-known-values.rs:70:5
217+
--> $DIR/well-known-values.rs:72:5
207218
|
208219
LL | target_thread_local = "_UNEXPECTED_VALUE",
209220
| ^^^^^^^^^^^^^^^^^^^----------------------
@@ -214,7 +225,7 @@ LL | target_thread_local = "_UNEXPECTED_VALUE",
214225
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
215226

216227
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
217-
--> $DIR/well-known-values.rs:72:5
228+
--> $DIR/well-known-values.rs:74:5
218229
|
219230
LL | target_vendor = "_UNEXPECTED_VALUE",
220231
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -223,7 +234,7 @@ LL | target_vendor = "_UNEXPECTED_VALUE",
223234
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
224235

225236
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
226-
--> $DIR/well-known-values.rs:74:5
237+
--> $DIR/well-known-values.rs:76:5
227238
|
228239
LL | test = "_UNEXPECTED_VALUE",
229240
| ^^^^----------------------
@@ -234,7 +245,7 @@ LL | test = "_UNEXPECTED_VALUE",
234245
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
235246

236247
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
237-
--> $DIR/well-known-values.rs:76:5
248+
--> $DIR/well-known-values.rs:78:5
238249
|
239250
LL | ub_checks = "_UNEXPECTED_VALUE",
240251
| ^^^^^^^^^----------------------
@@ -245,7 +256,7 @@ LL | ub_checks = "_UNEXPECTED_VALUE",
245256
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
246257

247258
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
248-
--> $DIR/well-known-values.rs:78:5
259+
--> $DIR/well-known-values.rs:80:5
249260
|
250261
LL | unix = "_UNEXPECTED_VALUE",
251262
| ^^^^----------------------
@@ -256,7 +267,7 @@ LL | unix = "_UNEXPECTED_VALUE",
256267
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
257268

258269
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
259-
--> $DIR/well-known-values.rs:80:5
270+
--> $DIR/well-known-values.rs:82:5
260271
|
261272
LL | windows = "_UNEXPECTED_VALUE",
262273
| ^^^^^^^----------------------
@@ -267,7 +278,7 @@ LL | windows = "_UNEXPECTED_VALUE",
267278
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
268279

269280
warning: unexpected `cfg` condition value: `linuz`
270-
--> $DIR/well-known-values.rs:86:7
281+
--> $DIR/well-known-values.rs:88:7
271282
|
272283
LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux`
273284
| ^^^^^^^^^^^^-------
@@ -277,5 +288,5 @@ LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux`
277288
= note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, `zkvm`
278289
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
279290

280-
warning: 28 warnings emitted
291+
warning: 29 warnings emitted
281292

‎triagebot.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,3 +1065,7 @@ project-exploit-mitigations = [
10651065
# Enable tracking of PR review assignment
10661066
# Documentation at: https://forge.rust-lang.org/triagebot/pr-assignment-tracking.html
10671067
[pr-tracking]
1068+
1069+
# Enable issue transfers within the org
1070+
# Documentation at: https://forge.rust-lang.org/triagebot/transfer.html
1071+
[transfer]

0 commit comments

Comments
 (0)
Please sign in to comment.