about summary refs log tree commit diff
path: root/tests/rustdoc-json/attrs/optimize.rs
blob: 5988120ab2f758d1571ea06b9d38789a3a146359 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![feature(optimize_attribute)]

//@ 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() {}