Skip to content

Commit 8edf255

Browse files
committed
Update non-local impl definition lint rule note
1 parent a1d7bff commit 8edf255

File tree

2 files changed

+52
-52
lines changed

2 files changed

+52
-52
lines changed

compiler/rustc_lint/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ lint_non_local_definitions_impl = non-local `impl` definition, they should be av
443443
[one] `{$body_name}`
444444
*[other] `{$body_name}` and up {$depth} bodies
445445
}
446-
.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
446+
.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`
447447
.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
448448
.const_anon = use a const-anon item to suppress this lint
449449

0 commit comments

Comments
 (0)