Error code E0534

The inline attribute was malformed.

Erroneous code example:

#[inline()] // error: expected one argument
pub fn something() {}

fn main() {}
Run

The parenthesized inline attribute requires the parameter to be specified:

#[inline(always)]
fn something() {}
Run

or:

#[inline(never)]
fn something() {}
Run

Alternatively, a paren-less version of the attribute may be used to hint the compiler about inlining opportunity:

#[inline]
fn something() {}
Run

For more information see the inline attribute section of the Reference.

Back to list of error codes