]> git.proxmox.com Git - rustc.git/blob - compiler/rustc_error_codes/src/error_codes/E0535.md
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / compiler / rustc_error_codes / src / error_codes / E0535.md
1 An unknown argument was given to the `inline` attribute.
2
3 Erroneous code example:
4
5 ```compile_fail,E0535
6 #[inline(unknown)] // error: invalid argument
7 pub fn something() {}
8
9 fn main() {}
10 ```
11
12 The `inline` attribute only supports two arguments:
13
14 * always
15 * never
16
17 All other arguments given to the `inline` attribute will return this error.
18 Example:
19
20 ```
21 #[inline(never)] // ok!
22 pub fn something() {}
23
24 fn main() {}
25 ```
26
27 For more information see the [`inline` Attribute][inline-attribute] section
28 of the Reference.
29
30 [inline-attribute]: https://doc.rust-lang.org/reference/attributes/codegen.html#the-inline-attribute