]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_messages/locales/en-US/lint.ftl
lint: port atomic ordering diagnostics
[rust.git] / compiler / rustc_error_messages / locales / en-US / lint.ftl
1 lint-array-into-iter =
2     this method call resolves to `<&{$target} as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to <{$target} as IntoIterator>::into_iter in Rust 2021
3     .use-iter-suggestion = use `.iter()` instead of `.into_iter()` to avoid ambiguity
4     .remove-into-iter-suggestion = or remove `.into_iter()` to iterate by value
5     .use-explicit-into-iter-suggestion =
6         or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value
7
8 lint-enum-intrinsics-mem-discriminant =
9     the return value of `mem::discriminant` is unspecified when called with a non-enum type
10     .note = the argument to `discriminant` should be a reference to an enum, but it was passed a reference to a `{$ty_param}`, which is not an enum.
11
12 lint-enum-intrinsics-mem-variant =
13     the return value of `mem::variant_count` is unspecified when called with a non-enum type
14     .note = the type parameter of `variant_count` should be an enum, but it was instantiated with the type `{$ty_param}`, which is not an enum.
15
16 lint-expectation = this lint expectation is unfulfilled
17     .note = the `unfulfilled_lint_expectations` lint can't be expected and will always produce this message
18
19 lint-hidden-unicode-codepoints = unicode codepoint changing visible direction of text present in {$label}
20     .label = this {$label} contains {$count ->
21         [one] an invisible
22         *[other] invisible
23     } unicode text flow control {$count ->
24         [one] codepoint
25         *[other] codepoints
26     }
27     .note = these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen
28     .suggestion-remove = if their presence wasn't intentional, you can remove them
29     .suggestion-escape = if you want to keep them but make them visible in your source code, you can escape them
30     .no-suggestion-note-escape = if you want to keep them but make them visible in your source code, you can escape them: {$escaped}
31
32 lint-default-hash-types = prefer `{$preferred}` over `{$used}`, it has better performance
33     .note = a `use rustc_data_structures::fx::{$preferred}` may be necessary
34
35 lint-query-instability = using `{$query}` can result in unstable query results
36     .note = if you believe this case to be fine, allow this lint and add a comment explaining your rationale
37
38 lint-tykind-kind = usage of `ty::TyKind::<kind>`
39     .suggestion = try using `ty::<kind>` directly
40
41 lint-tykind = usage of `ty::TyKind`
42     .help = try using `Ty` instead
43
44 lint-ty-qualified = usage of qualified `ty::{$ty}`
45     .suggestion = try importing it and using it unqualified
46
47 lint-lintpass-by-hand = implementing `LintPass` by hand
48     .help = try using `declare_lint_pass!` or `impl_lint_pass!` instead
49
50 lint-non-existant-doc-keyword = found non-existing keyword `{$keyword}` used in `#[doc(keyword = \"...\")]`
51     .help = only existing keywords are allowed in core/std
52
53 lint-diag-out-of-impl =
54     diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
55
56 lint-untranslatable-diag = diagnostics should be created using translatable messages
57
58 lint-cstring-ptr = getting the inner pointer of a temporary `CString`
59     .as-ptr-label = this pointer will be invalid
60     .unwrap-label = this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime
61     .note = pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned
62     .help = for more information, see https://doc.rust-lang.org/reference/destructors.html
63
64 lint-identifier-non-ascii-char = identifier contains non-ASCII characters
65
66 lint-identifier-uncommon-codepoints = identifier contains uncommon Unicode codepoints
67
68 lint-confusable-identifier-pair = identifier pair considered confusable between `{$existing_sym}` and `{$sym}`
69     .label = this is where the previous identifier occurred
70
71 lint-mixed-script-confusables =
72     the usage of Script Group `{$set}` in this crate consists solely of mixed script confusables
73     .includes-note = the usage includes {$includes}
74     .note = please recheck to make sure their usages are indeed what you want
75
76 lint-non-fmt-panic = panic message is not a string literal
77     .note = this usage of `{$name}!()` is deprecated; it will be a hard error in Rust 2021
78     .more-info-note = for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
79     .supports-fmt-note = the `{$name}!()` macro supports formatting, so there's no need for the `format!()` macro here
80     .supports-fmt-suggestion = remove the `format!(..)` macro call
81     .display-suggestion = add a "{"{"}{"}"}" format string to `Display` the message
82     .debug-suggestion =
83         add a "{"{"}:?{"}"}" format string to use the `Debug` implementation of `{$ty}`
84     .panic-suggestion = {$already_suggested ->
85         [true] or use
86         *[false] use
87     } std::panic::panic_any instead
88
89 lint-non-fmt-panic-unused =
90     panic message contains {$count ->
91         [one] an unused
92         *[other] unused
93     } formatting {$count ->
94         [one] placeholder
95         *[other] placeholders
96     }
97     .note = this message is not used as a format string when given without arguments, but will be in Rust 2021
98     .add-args-suggestion = add the missing {$count ->
99         [one] argument
100         *[other] arguments
101     }
102     .add-fmt-suggestion = or add a "{"{"}{"}"}" format string to use the message literally
103
104 lint-non-fmt-panic-braces =
105     panic message contains {$count ->
106         [one] a brace
107         *[other] braces
108     }
109     .note = this message is not used as a format string, but will be in Rust 2021
110     .suggestion = add a "{"{"}{"}"}" format string to use the message literally
111
112 lint-non-camel-case-type = {$sort} `{$name}` should have an upper camel case name
113     .suggestion = convert the identifier to upper camel case
114     .label = should have an UpperCamelCase name
115
116 lint-non-snake-case = {$sort} `{$name}` should have a snake case name
117     .rename-or-convert-suggestion = rename the identifier or convert it to a snake case raw identifier
118     .cannot-convert-note = `{$sc}` cannot be used as a raw identifier
119     .rename-suggestion = rename the identifier
120     .convert-suggestion = convert the identifier to snake case
121     .help = convert the identifier to snake case: `{$sc}`
122     .label = should have a snake_case name
123
124 lint-non-upper_case-global = {$sort} `{$name}` should have an upper case name
125     .suggestion = convert the identifier to upper case
126     .label = should have an UPPER_CASE name
127
128 lint-noop-method-call = call to `.{$method}()` on a reference in this situation does nothing
129     .label = unnecessary method call
130     .note = the type `{$receiver_ty}` which `{$method}` is being called on is the same as the type returned from `{$method}`, so the method call does not do anything and can be removed
131
132 lint-pass-by-value = passing `{$ty}` by reference
133     .suggestion = try passing by value
134
135 lint-redundant-semicolons =
136     unnecessary trailing {$multiple ->
137         [true] semicolons
138         *[false] semicolon
139     }
140     .suggestion = remove {$multiple ->
141         [true] these semicolons
142         *[false] this semicolon
143     }
144
145 lint-drop-trait-constraints =
146     bounds on `{$predicate}` are most likely incorrect, consider instead using `{$needs_drop}` to detect whether a type can be trivially dropped
147
148 lint-drop-glue =
149     types that do not implement `Drop` can still have drop glue, consider instead using `{$needs_drop}` to detect whether a type is trivially dropped
150
151 lint-range-endpoint-out-of-range = range endpoint is out of range for `{$ty}`
152     .suggestion = use an inclusive range instead
153
154 lint-overflowing-bin-hex = literal out of range for `{$ty}`
155     .negative-note = the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}`
156     .negative-becomes-note = and the value `-{$lit}` will become `{$actually}{$ty}`
157     .positive-note = the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}` and will become `{$actually}{$ty}`
158     .suggestion = consider using the type `{$suggestion_ty}` instead
159     .help = consider using the type `{$suggestion_ty}` instead
160
161 lint-overflowing-int = literal out of range for `{$ty}`
162     .note = the literal `{$lit}` does not fit into the type `{$ty}` whose range is `{$min}..={$max}`
163     .help = consider using the type `{$suggestion_ty}` instead
164
165 lint-only-cast-u8-to-char = only `u8` can be cast into `char`
166     .suggestion = use a `char` literal instead
167
168 lint-overflowing-uint = literal out of range for `{$ty}`
169     .note = the literal `{$lit}` does not fit into the type `{$ty}` whose range is `{$min}..={$max}`
170
171 lint-overflowing-literal = literal out of range for `{$ty}`
172     .note = the literal `{$lit}` does not fit into the type `{$ty}` and will be converted to `{$ty}::INFINITY`
173
174 lint-unused-comparisons = comparison is useless due to type limits
175
176 lint-improper-ctypes = `extern` {$desc} uses type `{$ty}`, which is not FFI-safe
177     .label = not FFI-safe
178     .note = the type is defined here
179
180 lint-improper-ctypes-opaque = opaque types have no C equivalent
181
182 lint-improper-ctypes-fnptr-reason = this function pointer has Rust-specific calling convention
183 lint-improper-ctypes-fnptr-help = consider using an `extern fn(...) -> ...` function pointer instead
184
185 lint-improper-ctypes-tuple-reason = tuples have unspecified layout
186 lint-improper-ctypes-tuple-help = consider using a struct instead
187
188 lint-improper-ctypes-str-reason = string slices have no C equivalent
189 lint-improper-ctypes-str-help = consider using `*const u8` and a length instead
190
191 lint-improper-ctypes-dyn = trait objects have no C equivalent
192
193 lint-improper-ctypes-slice-reason = slices have no C equivalent
194 lint-improper-ctypes-slice-help = consider using a raw pointer instead
195
196 lint-improper-ctypes-128bit = 128-bit integers don't currently have a known stable ABI
197
198 lint-improper-ctypes-char-reason = the `char` type has no C equivalent
199 lint-improper-ctypes-char-help = consider using `u32` or `libc::wchar_t` instead
200
201 lint-improper-ctypes-non-exhaustive = this enum is non-exhaustive
202 lint-improper-ctypes-non-exhaustive-variant = this enum has non-exhaustive variants
203
204 lint-improper-ctypes-enum-repr-reason = enum has no representation hint
205 lint-improper-ctypes-enum-repr-help =
206     consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
207
208 lint-improper-ctypes-struct-fieldless-reason = this struct has no fields
209 lint-improper-ctypes-struct-fieldless-help = consider adding a member to this struct
210
211 lint-improper-ctypes-union-fieldless-reason = this union has no fields
212 lint-improper-ctypes-union-fieldless-help = consider adding a member to this union
213
214 lint-improper-ctypes-struct-non-exhaustive = this struct is non-exhaustive
215 lint-improper-ctypes-union-non-exhaustive = this union is non-exhaustive
216
217 lint-improper-ctypes-struct-layout-reason = this struct has unspecified layout
218 lint-improper-ctypes-struct-layout-help = consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
219
220 lint-improper-ctypes-union-layout-reason = this union has unspecified layout
221 lint-improper-ctypes-union-layout-help = consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this union
222
223 lint-improper-ctypes-box = box cannot be represented as a single pointer
224
225 lint-improper-ctypes-enum-phantomdata = this enum contains a PhantomData field
226
227 lint-improper-ctypes-struct-zst = this struct contains only zero-sized fields
228
229 lint-improper-ctypes-array-reason = passing raw arrays by value is not FFI-safe
230 lint-improper-ctypes-array-help = consider passing a pointer to the array
231
232 lint-improper-ctypes-only-phantomdata = composed only of `PhantomData`
233
234 lint-variant-size-differences =
235     enum variant is more than three times larger ({$largest} bytes) than the next largest
236
237 lint-atomic-ordering-load = atomic loads cannot have `Release` or `AcqRel` ordering
238     .help = consider using ordering modes `Acquire`, `SeqCst` or `Relaxed`
239
240 lint-atomic-ordering-store = atomic stores cannot have `Acquire` or `AcqRel` ordering
241     .help = consider using ordering modes `Release`, `SeqCst` or `Relaxed`
242
243 lint-atomic-ordering-fence = memory fences cannot have `Relaxed` ordering
244     .help = consider using ordering modes `Acquire`, `Release`, `AcqRel` or `SeqCst`
245
246 lint-atomic-ordering-invalid = `{$method}`'s failure ordering may not be `Release` or `AcqRel`, since a failed `{$method}` does not result in a write
247     .label = invalid failure ordering
248     .help = consider using `Acquire` or `Relaxed` failure ordering instead
249
250 lint-atomic-ordering-invalid-fail-success = `{$method}`'s success ordering must be at least as strong as its failure ordering
251     .fail-label = `{$fail_ordering}` failure ordering
252     .success-label = `{$success_ordering}` success ordering
253     .suggestion = consider using `{$success_suggestion}` success ordering instead