Skip to content

Commit 2482f3c

Browse files
committed
Convert unexpected_cfg_{name,value} to struct diagnostics
1 parent bac6b62 commit 2482f3c

21 files changed

+472
-188
lines changed

compiler/rustc_lint/messages.ftl

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,40 @@ lint_undropped_manually_drops = calls to `std::mem::drop` with `std::mem::Manual
593593
.label = argument has type `{$arg_ty}`
594594
.suggestion = use `std::mem::ManuallyDrop::into_inner` to get the inner value
595595
596+
lint_unexpected_cfg_add_build_rs_println = or consider adding `{$build_rs_println}` to the top of the `build.rs`
597+
lint_unexpected_cfg_add_cargo_feature = consider using a Cargo feature instead
598+
lint_unexpected_cfg_add_cargo_toml_lint_cfg = or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:{$cargo_toml_lint_cfg}
599+
lint_unexpected_cfg_add_cmdline_arg = to expect this configuration use `{$cmdline_arg}`
600+
lint_unexpected_cfg_define_features = consider defining some features in `Cargo.toml`
601+
lint_unexpected_cfg_doc_cargo = see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
602+
lint_unexpected_cfg_doc_rustc = see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
603+
604+
lint_unexpected_cfg_name_expected_names = expected names are: {$possibilities}{$and_more ->
605+
[0] {""}
606+
*[other] {" "}and {$and_more} more
607+
}
608+
lint_unexpected_cfg_name_expected_values = expected values for `{$best_match}` are: {$possibilities}
609+
lint_unexpected_cfg_name_similar_name = there is a config with a similar name
610+
lint_unexpected_cfg_name_similar_name_different_values = there is a config with a similar name and different values
611+
lint_unexpected_cfg_name_similar_name_no_value = there is a config with a similar name and no value
612+
lint_unexpected_cfg_name_similar_name_value = there is a config with a similar name and value
613+
lint_unexpected_cfg_name_with_similar_value = found config with similar value
614+
615+
lint_unexpected_cfg_value_add_feature = consider adding `{$value}` as a feature in `Cargo.toml`
616+
lint_unexpected_cfg_value_expected_values = expected values for `{$name}` are: {$have_none_possibility ->
617+
[true] {"(none), "}
618+
*[false] {""}
619+
}{$possibilities}{$and_more ->
620+
[0] {""}
621+
*[other] {" "}and {$and_more} more
622+
}
623+
lint_unexpected_cfg_value_no_expected_value = no expected value for `{$name}`
624+
lint_unexpected_cfg_value_no_expected_values = no expected values for `{$name}`
625+
lint_unexpected_cfg_value_remove_condition = remove the condition
626+
lint_unexpected_cfg_value_remove_value = remove the value
627+
lint_unexpected_cfg_value_similar_name = there is a expected value with a similar name
628+
lint_unexpected_cfg_value_specify_value = specify a config value
629+
596630
lint_ungated_async_fn_track_caller = `#[track_caller]` on async functions is a no-op
597631
.label = this function will not propagate the caller location
598632

0 commit comments

Comments
 (0)