rust/src/test/ui/feature-gate-optimize_attribute.rs

19 lines
485 B
Rust
Raw Normal View History

#![crate_type="rlib"]
#![optimize(speed)] //~ ERROR `#[optimize]` attribute is an unstable feature
#[optimize(size)] //~ ERROR `#[optimize]` attribute is an unstable feature
mod module {
#[optimize(size)] //~ ERROR `#[optimize]` attribute is an unstable feature
fn size() {}
#[optimize(speed)] //~ ERROR `#[optimize]` attribute is an unstable feature
fn speed() {}
2019-01-19 00:37:52 +02:00
#[optimize(banana)]
//~^ ERROR `#[optimize]` attribute is an unstable feature
2019-01-19 00:37:52 +02:00
//~| ERROR E0722
fn not_known() {}
}