From 9bd5658c313f7ff84792fd12063ef3320952f33e Mon Sep 17 00:00:00 2001 From: Predrag Gruevski Date: Mon, 2 Sep 2024 20:35:13 +0000 Subject: [PATCH] Rename `variant_marked_non_exhaustive` to `enum_variant_marked_non_exhaustive`. This improves our lint naming consistency, since other enum variant lints have `enum_variant_` prefixes. --- ...on_exhaustive.ron => enum_variant_marked_non_exhaustive.ron} | 2 +- src/query.rs | 2 +- ...output.ron => enum_variant_marked_non_exhaustive.output.ron} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/lints/{variant_marked_non_exhaustive.ron => enum_variant_marked_non_exhaustive.ron} (98%) rename test_outputs/{variant_marked_non_exhaustive.output.ron => enum_variant_marked_non_exhaustive.output.ron} (100%) diff --git a/src/lints/variant_marked_non_exhaustive.ron b/src/lints/enum_variant_marked_non_exhaustive.ron similarity index 98% rename from src/lints/variant_marked_non_exhaustive.ron rename to src/lints/enum_variant_marked_non_exhaustive.ron index fb354dcd..ca806b36 100644 --- a/src/lints/variant_marked_non_exhaustive.ron +++ b/src/lints/enum_variant_marked_non_exhaustive.ron @@ -1,5 +1,5 @@ SemverQuery( - id: "variant_marked_non_exhaustive", + id: "enum_variant_marked_non_exhaustive", human_readable_name: "enum variant marked #[non_exhaustive]", description: "An exhaustive enum variant has been marked #[non_exhaustive].", reference: Some("An exhaustive enum variant has been marked #[non_exhaustive], preventing it from being constructed using a literal from outside its own crate."), diff --git a/src/query.rs b/src/query.rs index 049d581d..d81db08a 100644 --- a/src/query.rs +++ b/src/query.rs @@ -805,6 +805,7 @@ add_lints!( enum_tuple_variant_field_now_doc_hidden, enum_unit_variant_changed_kind, enum_variant_added, + enum_variant_marked_non_exhaustive, enum_variant_missing, exported_function_changed_abi, function_abi_no_longer_unwind, @@ -872,5 +873,4 @@ add_lints!( union_now_doc_hidden, union_pub_field_now_doc_hidden, unit_struct_changed_kind, - variant_marked_non_exhaustive, ); diff --git a/test_outputs/variant_marked_non_exhaustive.output.ron b/test_outputs/enum_variant_marked_non_exhaustive.output.ron similarity index 100% rename from test_outputs/variant_marked_non_exhaustive.output.ron rename to test_outputs/enum_variant_marked_non_exhaustive.output.ron