mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 01:24:03 +00:00
This commit stabilizes the `#[optimize]` attribute, which allows for more fine-grained control of optimization levels.
12 lines
372 B
Rust
12 lines
372 B
Rust
//@ is "$.index[?(@.name=='speed')].attrs" '[{"other": "#[attr = Optimize(Speed)]"}]'
|
|
#[optimize(speed)]
|
|
pub fn speed() {}
|
|
|
|
//@ is "$.index[?(@.name=='size')].attrs" '[{"other": "#[attr = Optimize(Size)]"}]'
|
|
#[optimize(size)]
|
|
pub fn size() {}
|
|
|
|
//@ is "$.index[?(@.name=='none')].attrs" '[{"other": "#[attr = Optimize(DoNotOptimize)]"}]'
|
|
#[optimize(none)]
|
|
pub fn none() {}
|