From 028e52d8aa72eb49e504c65cf67e38081ca3b41d Mon Sep 17 00:00:00 2001 From: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:40:52 -0400 Subject: [PATCH] Rename `trait_default_impl_removed` to `trait_method_default_impl_removed` (#909) --- ...moved.ron => trait_method_default_impl_removed.ron} | 2 +- src/query.rs | 2 +- .../new/Cargo.toml | 2 +- .../new/src/lib.rs | 0 .../old/Cargo.toml | 2 +- .../old/src/lib.rs | 0 ...on => trait_method_default_impl_removed.output.ron} | 10 +++++----- test_outputs/trait_method_missing.output.ron | 4 ++-- test_outputs/trait_newly_sealed.output.ron | 7 +++---- test_outputs/trait_no_longer_object_safe.output.ron | 4 ++-- 10 files changed, 16 insertions(+), 17 deletions(-) rename src/lints/{trait_default_impl_removed.ron => trait_method_default_impl_removed.ron} (98%) rename test_crates/{trait_default_impl_removed => trait_method_default_impl_removed}/new/Cargo.toml (64%) rename test_crates/{trait_default_impl_removed => trait_method_default_impl_removed}/new/src/lib.rs (100%) rename test_crates/{trait_default_impl_removed => trait_method_default_impl_removed}/old/Cargo.toml (64%) rename test_crates/{trait_default_impl_removed => trait_method_default_impl_removed}/old/src/lib.rs (100%) rename test_outputs/{trait_default_impl_removed.output.ron => trait_method_default_impl_removed.output.ron} (86%) diff --git a/src/lints/trait_default_impl_removed.ron b/src/lints/trait_method_default_impl_removed.ron similarity index 98% rename from src/lints/trait_default_impl_removed.ron rename to src/lints/trait_method_default_impl_removed.ron index 4af6a117..cbde9607 100644 --- a/src/lints/trait_default_impl_removed.ron +++ b/src/lints/trait_method_default_impl_removed.ron @@ -1,5 +1,5 @@ SemverQuery( - id: "trait_default_impl_removed", + id: "trait_method_default_impl_removed", human_readable_name: "pub trait default method impl removed", description: "A non-sealed public trait default method impl was removed", required_update: Major, diff --git a/src/query.rs b/src/query.rs index d81db08a..be1696e1 100644 --- a/src/query.rs +++ b/src/query.rs @@ -849,7 +849,7 @@ add_lints!( trait_associated_type_added, trait_associated_type_default_removed, trait_associated_type_now_doc_hidden, - trait_default_impl_removed, + trait_method_default_impl_removed, trait_method_added, trait_method_missing, trait_method_now_doc_hidden, diff --git a/test_crates/trait_default_impl_removed/new/Cargo.toml b/test_crates/trait_method_default_impl_removed/new/Cargo.toml similarity index 64% rename from test_crates/trait_default_impl_removed/new/Cargo.toml rename to test_crates/trait_method_default_impl_removed/new/Cargo.toml index f3a5cc86..ea95420e 100644 --- a/test_crates/trait_default_impl_removed/new/Cargo.toml +++ b/test_crates/trait_method_default_impl_removed/new/Cargo.toml @@ -1,6 +1,6 @@ [package] publish = false -name = "trait_default_impl_removed" +name = "trait_method_default_impl_removed" version = "0.1.0" edition = "2021" diff --git a/test_crates/trait_default_impl_removed/new/src/lib.rs b/test_crates/trait_method_default_impl_removed/new/src/lib.rs similarity index 100% rename from test_crates/trait_default_impl_removed/new/src/lib.rs rename to test_crates/trait_method_default_impl_removed/new/src/lib.rs diff --git a/test_crates/trait_default_impl_removed/old/Cargo.toml b/test_crates/trait_method_default_impl_removed/old/Cargo.toml similarity index 64% rename from test_crates/trait_default_impl_removed/old/Cargo.toml rename to test_crates/trait_method_default_impl_removed/old/Cargo.toml index f3a5cc86..ea95420e 100644 --- a/test_crates/trait_default_impl_removed/old/Cargo.toml +++ b/test_crates/trait_method_default_impl_removed/old/Cargo.toml @@ -1,6 +1,6 @@ [package] publish = false -name = "trait_default_impl_removed" +name = "trait_method_default_impl_removed" version = "0.1.0" edition = "2021" diff --git a/test_crates/trait_default_impl_removed/old/src/lib.rs b/test_crates/trait_method_default_impl_removed/old/src/lib.rs similarity index 100% rename from test_crates/trait_default_impl_removed/old/src/lib.rs rename to test_crates/trait_method_default_impl_removed/old/src/lib.rs diff --git a/test_outputs/trait_default_impl_removed.output.ron b/test_outputs/trait_method_default_impl_removed.output.ron similarity index 86% rename from test_outputs/trait_default_impl_removed.output.ron rename to test_outputs/trait_method_default_impl_removed.output.ron index d2b3f484..888cf96f 100644 --- a/test_outputs/trait_default_impl_removed.output.ron +++ b/test_outputs/trait_method_default_impl_removed.output.ron @@ -1,10 +1,10 @@ { - "./test_crates/trait_default_impl_removed/": [ + "./test_crates/trait_method_default_impl_removed/": [ { "method_name": String("method_default_impl_removed"), "name": String("TraitA"), "path": List([ - String("trait_default_impl_removed"), + String("trait_method_default_impl_removed"), String("TraitA"), ]), "span_begin_line": Uint64(8), @@ -15,7 +15,7 @@ "method_name": String("method_default_impl_removed_and_becomes_non_obj_safe"), "name": String("TraitD"), "path": List([ - String("trait_default_impl_removed"), + String("trait_method_default_impl_removed"), String("TraitD"), ]), "span_begin_line": Uint64(22), @@ -26,7 +26,7 @@ "method_name": String("method_default_impl_removed_and_becomes_sealed"), "name": String("TraitE"), "path": List([ - String("trait_default_impl_removed"), + String("trait_method_default_impl_removed"), String("TraitE"), ]), "span_begin_line": Uint64(27), @@ -37,7 +37,7 @@ "method_name": String("method_partially_sealed_has_default_impl_removed"), "name": String("TraitF"), "path": List([ - String("trait_default_impl_removed"), + String("trait_method_default_impl_removed"), String("TraitF"), ]), "span_begin_line": Uint64(32), diff --git a/test_outputs/trait_method_missing.output.ron b/test_outputs/trait_method_missing.output.ron index b084be8a..84a4be7f 100644 --- a/test_outputs/trait_method_missing.output.ron +++ b/test_outputs/trait_method_missing.output.ron @@ -1,10 +1,10 @@ { - "./test_crates/trait_default_impl_removed/": [ + "./test_crates/trait_method_default_impl_removed/": [ { "method_name": String("method_becomes_removed"), "name": String("TraitB"), "path": List([ - String("trait_default_impl_removed"), + String("trait_method_default_impl_removed"), String("TraitB"), ]), "span_begin_line": Uint64(14), diff --git a/test_outputs/trait_newly_sealed.output.ron b/test_outputs/trait_newly_sealed.output.ron index 14aee41b..42cd1032 100644 --- a/test_outputs/trait_newly_sealed.output.ron +++ b/test_outputs/trait_newly_sealed.output.ron @@ -57,11 +57,11 @@ "visibility_limit": String("public"), }, ], - "./test_crates/trait_default_impl_removed/": [ + "./test_crates/trait_method_default_impl_removed/": [ { "name": String("TraitE"), "path": List([ - String("trait_default_impl_removed"), + String("trait_method_default_impl_removed"), String("TraitE"), ]), "span_begin_line": Uint64(26), @@ -71,7 +71,7 @@ { "name": String("TraitF"), "path": List([ - String("trait_default_impl_removed"), + String("trait_method_default_impl_removed"), String("TraitF"), ]), "span_begin_line": Uint64(31), @@ -80,4 +80,3 @@ }, ], } - diff --git a/test_outputs/trait_no_longer_object_safe.output.ron b/test_outputs/trait_no_longer_object_safe.output.ron index f69d496f..b78ecb79 100644 --- a/test_outputs/trait_no_longer_object_safe.output.ron +++ b/test_outputs/trait_no_longer_object_safe.output.ron @@ -21,11 +21,11 @@ "visibility_limit": String("public"), }, ], - "./test_crates/trait_default_impl_removed/": [ + "./test_crates/trait_method_default_impl_removed/": [ { "name": String("TraitD"), "path": List([ - String("trait_default_impl_removed"), + String("trait_method_default_impl_removed"), String("TraitD"), ]), "span_begin_line": Uint64(21),