Skip to content

Commit 68ef1df

Browse files
committed
Convert unexpected_cfg_{name,value} to struct diagnostics
1 parent 317917c commit 68ef1df

21 files changed

+457
-182
lines changed

compiler/rustc_lint/messages.ftl

+36
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,42 @@ lint_undropped_manually_drops = calls to `std::mem::drop` with `std::mem::Manual
655655
.label = argument has type `{$arg_ty}`
656656
.suggestion = use `std::mem::ManuallyDrop::into_inner` to get the inner value
657657
658+
lint_unexpected_cfg_name_add_cargo_feature = consider using a Cargo feature instead or adding `{$build_rs_println}` to the top of a `build.rs`
659+
lint_unexpected_cfg_name_add_cmdline_arg = to expect this configuration use `{$cmdline_arg}`
660+
lint_unexpected_cfg_name_define_features = consider defining some features in `Cargo.toml`
661+
lint_unexpected_cfg_name_doc_cargo = see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
662+
lint_unexpected_cfg_name_doc_rustc = see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
663+
lint_unexpected_cfg_name_expected_names = expected names are: {$possibilities}{$and_more ->
664+
[0] {""}
665+
*[others] {" "}and {$and_more} more
666+
}
667+
lint_unexpected_cfg_name_expected_values = expected values for `{$best_match}` are: {$possibilities}
668+
lint_unexpected_cfg_name_similar_name = there is a config with a similar name
669+
lint_unexpected_cfg_name_similar_name_different_values = there is a config with a similar name and different values
670+
lint_unexpected_cfg_name_similar_name_no_value = there is a config with a similar name and no value
671+
lint_unexpected_cfg_name_similar_name_value = there is a config with a similar name and value
672+
lint_unexpected_cfg_name_with_similar_value = found config with similar value
673+
674+
lint_unexpected_cfg_value_add_cmdline_arg = to expect this configuration use `{$cmdline_arg}`
675+
lint_unexpected_cfg_value_add_feature = consider adding `{$value}` as a feature in `Cargo.toml`
676+
lint_unexpected_cfg_value_define_features = consider defining some features in `Cargo.toml`
677+
lint_unexpected_cfg_value_doc_cargo = see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration
678+
lint_unexpected_cfg_value_doc_rustc = see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
679+
lint_unexpected_cfg_value_expected_values = expected values for `{$name}` are: {$have_none_possibility ->
680+
[true] {"(none), "}
681+
*[false] {""}
682+
}{$possibilities}{$and_more ->
683+
[0] {""}
684+
*[others] {" "}and {$and_more} more
685+
}
686+
lint_unexpected_cfg_value_no_expected_value = no expected value for `{$name}`
687+
lint_unexpected_cfg_value_no_expected_values = no expected values for `{$name}`
688+
lint_unexpected_cfg_value_remove_condition = remove the condition
689+
lint_unexpected_cfg_value_remove_value = remove the value
690+
lint_unexpected_cfg_value_similar_name = there is a expected value with a similar name
691+
lint_unexpected_cfg_value_specify_value = specify a config value
692+
lint_unexpected_cfg_value_use_features_or_build_rs = consider using a Cargo feature instead or adding `{$build_rs_println}` to the top of a `build.rs`
693+
658694
lint_ungated_async_fn_track_caller = `#[track_caller]` on async functions is a no-op
659695
.label = this function will not propagate the caller location
660696

0 commit comments

Comments
 (0)