The optimize
attribute was malformed.
Erroneous code example:
#![feature(optimize_attribute)]
#[optimize(something)] // error: invalid argument
pub fn something() {}
RunThe #[optimize]
attribute should be used as follows:
#[optimize(size)]
– instructs the optimization pipeline to generate code
that’s smaller rather than faster
#[optimize(speed)]
– instructs the optimization pipeline to generate code
that’s faster rather than smaller
For example:
#![feature(optimize_attribute)]
#[optimize(size)]
pub fn something() {}
RunSee RFC 2412 for more details.