about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2024-05-15 14:17:30 +0200
committerUrgau <urgau@numericable.fr>2024-05-27 23:59:18 +0200
commitab23fd8dea02b9e525771ed8ec6cca1ff6d414e4 (patch)
tree76ec11c695fc6c3de0aed8cc675ecec23821064b /compiler
parentd3dfe14b53e2211138e3a4eae5915351ff62f5bc (diff)
downloadrust-ab23fd8dea02b9e525771ed8ec6cca1ff6d414e4.tar.gz
rust-ab23fd8dea02b9e525771ed8ec6cca1ff6d414e4.zip
non_local_defs: improve main without a trait note
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_lint/messages.ftl2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/messages.ftl b/compiler/rustc_lint/messages.ftl
index 13f6d116b81..f1273b8bf4b 100644
--- a/compiler/rustc_lint/messages.ftl
+++ b/compiler/rustc_lint/messages.ftl
@@ -548,7 +548,7 @@ lint_non_local_definitions_impl = non-local `impl` definition, `impl` blocks sho
             [one] `{$body_name}`
            *[other] `{$body_name}` and up {$depth} bodies
         }
-    .without_trait = methods and assoc const are still usable outside the current expression, only `impl Local` and `impl dyn Local` are local and only if the `Local` type is at the same nesting as the `impl` block
+    .without_trait = methods and associated constants are still usable outside the current expression, only `impl Local` and `impl dyn Local` can ever be private, and only if the type is nested in the same item as the `impl`
     .with_trait = an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
     .bounds = `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
     .exception = items in an anonymous const item (`const _: () = {"{"} ... {"}"}`) are treated as in the same scope as the anonymous const's declaration