Skip to content

Commit

Permalink
Improve error message for inherent_method_const_removed lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi committed Nov 7, 2023
1 parent 34b9636 commit 592219f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lints/inherent_method_const_removed.ron
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ SemverQuery(
method {
visibility_limit @filter(op: "one_of", value: ["$public_or_default"])
name @filter(op: "=", value: ["%method_name"])
unsafe @filter(op: "=", value: ["$true"])
const @filter(op: "!=", value: ["$true"])
non_matching_span_: span @optional {
filename @output
Expand All @@ -93,5 +93,5 @@ SemverQuery(
"true": true,
},
error_message: "A publicly-visible method or associated fn is no longer `const` and can no longer be used in a `const` context.",
per_result_error_template: Some("{{name}}::{{method_name}} in file {{span_filename}}:{{span_begin_line}}"),
per_result_error_template: Some("{{name}}::{{method_name}} in {{multiple_spans non_matching_span_filename non_matching_span_begin_line}}"),
)

0 comments on commit 592219f

Please sign in to comment.