]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0535.md
Rollup merge of #67875 - dtolnay:hidden, r=GuillaumeGomez
[rust.git] / src / librustc_error_codes / error_codes / E0535.md
1 An unknown argument was given to the `inline` attribute.
2
3 Erroneous code example:
4
5 ```ignore (compile_fail not working here; see Issue #43707)
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 about the inline attribute, https:
28 read://doc.rust-lang.org/reference.html#inline-attributes