Skip to content

Commit 757cd3b

Browse files
committed
Convert unexpected_cfg_{name,value} to struct diagnostics
1 parent 06247da commit 757cd3b

21 files changed

+457
-182
lines changed

compiler/rustc_lint/messages.ftl

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,42 @@ lint_undropped_manually_drops = calls to `std::mem::drop` with `std::mem::Manual
582582
.label = argument has type `{$arg_ty}`
583583
.suggestion = use `std::mem::ManuallyDrop::into_inner` to get the inner value
584584
585+
lint_unexpected_cfg_name_add_cargo_feature = consider using a Cargo feature instead or adding `{$build_rs_println}` to the top of the `build.rs`
586+
lint_unexpected_cfg_name_add_cmdline_arg = to expect this configuration use `{$cmdline_arg}`
587+
lint_unexpected_cfg_name_define_features = consider defining some features in `Cargo.toml`
588+
lint_unexpected_cfg_name_doc_cargo = see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
589+
lint_unexpected_cfg_name_doc_rustc = see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
590+
lint_unexpected_cfg_name_expected_names = expected names are: {$possibilities}{$and_more ->
591+
[0] {""}
592+
*[others] {" "}and {$and_more} more
593+
}
594+
lint_unexpected_cfg_name_expected_values = expected values for `{$best_match}` are: {$possibilities}
595+
lint_unexpected_cfg_name_similar_name = there is a config with a similar name
596+
lint_unexpected_cfg_name_similar_name_different_values = there is a config with a similar name and different values
597+
lint_unexpected_cfg_name_similar_name_no_value = there is a config with a similar name and no value
598+
lint_unexpected_cfg_name_similar_name_value = there is a config with a similar name and value
599+
lint_unexpected_cfg_name_with_similar_value = found config with similar value
600+
601+
lint_unexpected_cfg_value_add_cmdline_arg = to expect this configuration use `{$cmdline_arg}`
602+
lint_unexpected_cfg_value_add_feature = consider adding `{$value}` as a feature in `Cargo.toml`
603+
lint_unexpected_cfg_value_define_features = consider defining some features in `Cargo.toml`
604+
lint_unexpected_cfg_value_doc_cargo = see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
605+
lint_unexpected_cfg_value_doc_rustc = see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
606+
lint_unexpected_cfg_value_expected_values = expected values for `{$name}` are: {$have_none_possibility ->
607+
[true] {"(none), "}
608+
*[false] {""}
609+
}{$possibilities}{$and_more ->
610+
[0] {""}
611+
*[others] {" "}and {$and_more} more
612+
}
613+
lint_unexpected_cfg_value_no_expected_value = no expected value for `{$name}`
614+
lint_unexpected_cfg_value_no_expected_values = no expected values for `{$name}`
615+
lint_unexpected_cfg_value_remove_condition = remove the condition
616+
lint_unexpected_cfg_value_remove_value = remove the value
617+
lint_unexpected_cfg_value_similar_name = there is a expected value with a similar name
618+
lint_unexpected_cfg_value_specify_value = specify a config value
619+
lint_unexpected_cfg_value_use_features_or_build_rs = consider using a Cargo feature instead or adding `{$build_rs_println}` to the top of the `build.rs`
620+
585621
lint_ungated_async_fn_track_caller = `#[track_caller]` on async functions is a no-op
586622
.label = this function will not propagate the caller location
587623

0 commit comments

Comments
 (0)