]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0534.md
Rollup merge of #68361 - t6:patch-freebsd-lld-i386, r=alexcrichton
[rust.git] / src / librustc_error_codes / error_codes / E0534.md
1 The `inline` attribute was malformed.
2
3 Erroneous code example:
4
5 ```ignore (compile_fail not working here; see Issue #43707)
6 #[inline()] // error: expected one argument
7 pub fn something() {}
8
9 fn main() {}
10 ```
11
12 The parenthesized `inline` attribute requires the parameter to be specified:
13
14 ```
15 #[inline(always)]
16 fn something() {}
17 ```
18
19 or:
20
21 ```
22 #[inline(never)]
23 fn something() {}
24 ```
25
26 Alternatively, a paren-less version of the attribute may be used to hint the
27 compiler about inlining opportunity:
28
29 ```
30 #[inline]
31 fn something() {}
32 ```
33
34 For more information about the inline attribute, read:
35 https://doc.rust-lang.org/reference.html#inline-attributes