Skip to content

Commit f4abdd0

Browse files
committed
formatted description and error messages
1 parent 8b6f32d commit f4abdd0

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/lints/pub_api_sealed_trait_became_unconditionally_sealed.ron

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
SemverQuery(
22
id: "pub_api_sealed_trait_became_unconditionally_sealed",
33
human_readable_name: "Public API sealed trait became unconditionally sealed",
4-
description: "A trait that was previously only sealed to public API consumers is now unconditionally sealed.
5-
This change prevents all external implementations, including from related first-party crates
6-
that might have relied on private API access",
4+
description: "A public API sealed traitis now unconditionally sealed, blocking all external implementations, including first-party crates relying on non-public API access.",
75
required_update: Major,
8-
lint_level: Deny,
6+
lint_level: Warn,
97
reference_link: Some("https://rust-lang.github.io/api-guidelines/future-proofing.html#sealed-traits-protect-against-downstream-implementations-c-sealed"),
108
query: r#"
119
{
@@ -16,6 +14,7 @@ SemverQuery(
1614
visibility_limit @filter(op: "=", value: ["$public"]) @output
1715
public_api_sealed @filter(op: "=", value: ["$true"])
1816
unconditionally_sealed @filter(op: "!=", value: ["$true"])
17+
1918
importable_path {
2019
path @output @tag
2120
public_api @filter(op: "=", value: ["$true"])
@@ -29,10 +28,12 @@ SemverQuery(
2928
visibility_limit @filter(op: "=", value: ["$public"])
3029
unconditionally_sealed @filter(op: "=", value: ["$true"])
3130
name @output
31+
3232
importable_path {
3333
path @filter(op: "=", value: ["%path"])
3434
public_api @filter(op: "=", value: ["$true"])
3535
}
36+
3637
span_: span @optional {
3738
filename @output
3839
begin_line @output
@@ -47,9 +48,7 @@ SemverQuery(
4748
"public": "public",
4849
"true": true,
4950
},
50-
error_message: "A public API sealed trait is now unconditionally sealed, preventing all external implementations.
51-
This change impacts related first-party crates (e.g., derive macros or other internal tooling)
52-
that previously could implement the trait using non-public API",
51+
error_message: "A public API sealed trait is now fully sealed, blocking all external implementations, including first-party crates relying on non-public API.",
5352
per_result_error_template: Some("trait {{join \"::\" path}} in file {{span_filename}}:{{span_begin_line}}"),
5453
witness: None,
5554
)

0 commit comments

Comments
 (0)