Skip to content

Commit

Permalink
Update non-local impl definition lint rule note
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau committed Apr 5, 2024
1 parent a1d7bff commit 8edf255
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_lint/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ lint_non_local_definitions_impl = non-local `impl` definition, they should be av
[one] `{$body_name}`
*[other] `{$body_name}` and up {$depth} bodies
}
.non_local = an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
.non_local = an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
.exception = one exception to the rule are anon-const (`const _: () = {"{"} ... {"}"}`) at top-level module and anon-const at the same nesting as the trait or type
.const_anon = use a const-anon item to suppress this lint
Expand Down
Loading

0 comments on commit 8edf255

Please sign in to comment.