1 -passes-previously-accepted =
2 this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
5 see issue #{$issue} <https://github.com/rust-lang/rust/issues/{$issue}> for more information
7 passes-outer-crate-level-attr =
8 crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
10 passes-inner-crate-level-attr =
11 crate-level attribute should be in the root module
13 passes-ignored-attr-with-macro = `#[{$sym}]` is ignored on struct fields, match arms and macro defs
14 .warn = {-passes-previously-accepted}
15 .note = {-passes-see-issue(issue: "80564")}
17 passes-ignored-attr = `#[{$sym}]` is ignored on struct fields and match arms
18 .warn = {-passes-previously-accepted}
19 .note = {-passes-see-issue(issue: "80564")}
21 passes-inline-ignored-function-prototype = `#[inline]` is ignored on function prototypes
23 passes-inline-ignored-constants = `#[inline]` is ignored on constants
24 .warn = {-passes-previously-accepted}
25 .note = {-passes-see-issue(issue: "65833")}
27 passes-inline-not-fn-or-closure = attribute should be applied to function or closure
28 .label = not a function or closure
30 passes-no-coverage-ignored-function-prototype = `#[no_coverage]` is ignored on function prototypes
32 passes-no-coverage-propagate =
33 `#[no_coverage]` does not propagate into items and must be applied to the contained functions directly
35 passes-no-coverage-fn-defn = `#[no_coverage]` may only be applied to function definitions
37 passes-no-coverage-not-coverable = `#[no_coverage]` must be applied to coverable code
38 .label = not coverable code
40 passes-should-be-applied-to-fn = attribute should be applied to a function definition
41 .label = not a function definition
43 passes-naked-tracked-caller = cannot use `#[track_caller]` with `#[naked]`
45 passes-should-be-applied-to-struct-enum = attribute should be applied to a struct or enum
46 .label = not a struct or enum
48 passes-should-be-applied-to-trait = attribute should be applied to a trait
51 passes-target-feature-on-statement = {passes-should-be-applied-to-fn}
52 .warn = {-passes-previously-accepted}
53 .label = {passes-should-be-applied-to-fn.label}
55 passes-should-be-applied-to-static = attribute should be applied to a static
58 passes-doc-expect-str = doc {$attr_name} attribute expects a string: #[doc({$attr_name} = "a")]
60 passes-doc-alias-empty = {$attr_str} attribute cannot have empty value
62 passes-doc-alias-bad-char = {$char_} character isn't allowed in {$attr_str}
64 passes-doc-alias-start-end = {$attr_str} cannot start or end with ' '
66 passes-doc-alias-bad-location = {$attr_str} isn't allowed on {$location}
68 passes-doc-alias-not-an-alias = {$attr_str} is the same as the item's name
70 passes-doc-alias-duplicated = doc alias is duplicated
71 .label = first defined here
73 passes-doc-alias-not-string-literal = `#[doc(alias("a"))]` expects string literals
75 passes-doc-alias-malformed =
76 doc alias attribute expects a string `#[doc(alias = "a")]` or a list of strings `#[doc(alias("a", "b"))]`
78 passes-doc-keyword-empty-mod = `#[doc(keyword = "...")]` should be used on empty modules
80 passes-doc-keyword-not-mod = `#[doc(keyword = "...")]` should be used on modules
82 passes-doc-keyword-invalid-ident = `{$doc_keyword}` is not a valid identifier
84 passes-doc-fake-variadic-not-valid =
85 `#[doc(fake_variadic)]` must be used on the first of a set of tuple or fn pointer trait impls with varying arity
87 passes-doc-keyword-only-impl = `#[doc(keyword = "...")]` should be used on impl blocks
89 passes-doc-inline-conflict-first = this attribute...
90 passes-doc-inline-conflict-second = ...conflicts with this attribute
91 passes-doc-inline-conflict = conflicting doc inlining attributes
92 .help = remove one of the conflicting attributes
94 passes-doc-inline-only-use = this attribute can only be applied to a `use` item
95 .label = only applicable on `use` items
96 .not-a-use-item-label = not a `use` item
97 .note = read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#inline-and-no_inline> for more information
99 passes-doc-attr-not-crate-level =
100 `#![doc({$attr_name} = "...")]` isn't allowed as a crate-level attribute
102 passes-attr-crate-level = this attribute can only be applied at the crate level
103 .suggestion = to apply to the crate, use an inner attribute
104 .help = to apply to the crate, use an inner attribute
105 .note = read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
107 passes-doc-test-unknown = unknown `doc(test)` attribute `{$path}`
109 passes-doc-test-takes-list = `#[doc(test(...)]` takes a list of attributes
111 passes-doc-primitive = `doc(primitive)` should never have been stable
113 passes-doc-test-unknown-any = unknown `doc` attribute `{$path}`
115 passes-doc-test-unknown-spotlight = unknown `doc` attribute `{$path}`
116 .note = `doc(spotlight)` was renamed to `doc(notable_trait)`
117 .suggestion = use `notable_trait` instead
118 .no-op-note = `doc(spotlight)` is now a no-op
120 passes-doc-test-unknown-include = unknown `doc` attribute `{$path}`
121 .suggestion = use `doc = include_str!` instead
123 passes-doc-invalid = invalid `doc` attribute
125 passes-pass-by-value = `pass_by_value` attribute should be applied to a struct, enum or type alias
126 .label = is not a struct, enum or type alias
128 passes-allow-incoherent-impl =
129 `rustc_allow_incoherent_impl` attribute should be applied to impl items.
130 .label = the only currently supported targets are inherent methods
132 passes-has-incoherent-inherent-impl =
133 `rustc_has_incoherent_inherent_impls` attribute should be applied to types or traits.
134 .label = only adts, extern types and traits are supported
136 passes-must-use-async =
137 `must_use` attribute on `async` functions applies to the anonymous `Future` returned by the function, not the value within
138 .label = this attribute does nothing, the `Future`s returned by async functions are already `must_use`
140 passes-must-use-no-effect = `#[must_use]` has no effect when applied to {$article} {$target}
142 passes-must-not-suspend = `must_not_suspend` attribute should be applied to a struct, enum, or trait
143 .label = is not a struct, enum, or trait
145 passes-cold = {passes-should-be-applied-to-fn}
146 .warn = {-passes-previously-accepted}
147 .label = {passes-should-be-applied-to-fn.label}
149 passes-link = attribute should be applied to an `extern` block with non-Rust ABI
150 .warn = {-passes-previously-accepted}
151 .label = not an `extern` block
153 passes-link-name = attribute should be applied to a foreign function or static
154 .warn = {-passes-previously-accepted}
155 .label = not a foreign function or static
156 .help = try `#[link(name = "{$value}")]` instead
158 passes-no-link = attribute should be applied to an `extern crate` item
159 .label = not an `extern crate` item
161 passes-export-name = attribute should be applied to a free function, impl method or static
162 .label = not a free function, impl method or static
164 passes-rustc-layout-scalar-valid-range-not-struct = attribute should be applied to a struct
165 .label = not a struct
167 passes-rustc-layout-scalar-valid-range-arg = expected exactly one integer literal argument
169 passes-rustc-legacy-const-generics-only = #[rustc_legacy_const_generics] functions must only have const generics
170 .label = non-const generic parameter
172 passes-rustc-legacy-const-generics-index = #[rustc_legacy_const_generics] must have one index for each generic parameter
173 .label = generic parameters
175 passes-rustc-legacy-const-generics-index-exceed = index exceeds number of arguments
176 .label = there {$arg_count ->
179 } only {$arg_count} {$arg_count ->
184 passes-rustc-legacy-const-generics-index-negative = arguments should be non-negative integers
186 passes-rustc-dirty-clean = attribute requires -Z query-dep-graph to be enabled
188 passes-link-section = attribute should be applied to a function or static
189 .warn = {-passes-previously-accepted}
190 .label = not a function or static
192 passes-no-mangle-foreign = `#[no_mangle]` has no effect on a foreign {$foreign_item_kind}
193 .warn = {-passes-previously-accepted}
194 .label = foreign {$foreign_item_kind}
195 .note = symbol names in extern blocks are not mangled
196 .suggestion = remove this attribute
198 passes-no-mangle = attribute should be applied to a free function, impl method or static
199 .warn = {-passes-previously-accepted}
200 .label = not a free function, impl method or static
202 passes-repr-ident = meta item in `repr` must be an identifier
204 passes-repr-conflicting = conflicting representation hints
206 passes-used-static = attribute must be applied to a `static` variable
208 passes-used-compiler-linker = `used(compiler)` and `used(linker)` can't be used together
210 passes-allow-internal-unstable = attribute should be applied to a macro
213 passes-debug-visualizer-placement = attribute should be applied to a module
215 passes-debug-visualizer-invalid = invalid argument
216 .note-1 = expected: `natvis_file = "..."`
218 .note-3 = expected: `gdb_script_file = "..."`
220 passes-rustc-allow-const-fn-unstable = attribute should be applied to `const fn`
221 .label = not a `const fn`
223 passes-rustc-std-internal-symbol = attribute should be applied to functions or statics
224 .label = not a function or static
226 passes-const-trait = attribute should be applied to a trait
228 passes-stability-promotable = attribute cannot be applied to an expression
230 passes-deprecated = attribute is ignored here
232 passes-macro-use = `#[{$name}]` only has an effect on `extern crate` and modules
234 passes-macro-export = `#[macro_export]` only has an effect on macro definitions
236 passes-plugin-registrar = `#[plugin_registrar]` only has an effect on functions
238 passes-unused-empty-lints-note = attribute `{$name}` with an empty list has no effect
240 passes-unused-no-lints-note = attribute `{$name}` without any lints has no effect
242 passes-unused-default-method-body-const-note =
243 `default_method_body_is_const` has been replaced with `#[const_trait]` on traits
245 passes-unused = unused attribute
246 .suggestion = remove this attribute
248 passes-non-exported-macro-invalid-attrs = attribute should be applied to function or closure
249 .label = not a function or closure
251 passes-unused-duplicate = unused attribute
252 .suggestion = remove this attribute
253 .note = attribute also specified here
254 .warn = {-passes-previously-accepted}
256 passes-unused-multiple = multiple `{$name}` attributes
257 .suggestion = remove this attribute
258 .note = attribute also specified here
260 passes-rustc-lint-opt-ty = `#[rustc_lint_opt_ty]` should be applied to a struct
261 .label = not a struct
263 passes-rustc-lint-opt-deny-field-access = `#[rustc_lint_opt_deny_field_access]` should be applied to a field
266 passes-link-ordinal = attribute should be applied to a foreign function or static
267 .label = not a foreign function or static