rustdoc-json: Add test for #[optimize(..)]
Follow up to https://www.github.com/rust-lang/rust/pull/138291
This commit is contained in:
parent
42245d34d2
commit
bec2679e4e
1 changed files with 13 additions and 0 deletions
13
tests/rustdoc-json/attrs/optimize.rs
Normal file
13
tests/rustdoc-json/attrs/optimize.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#![feature(optimize_attribute)]
|
||||
|
||||
//@ is "$.index[?(@.name=='speed')].attrs" '["#[attr = Optimize(Speed)]"]'
|
||||
#[optimize(speed)]
|
||||
pub fn speed() {}
|
||||
|
||||
//@ is "$.index[?(@.name=='size')].attrs" '["#[attr = Optimize(Size)]"]'
|
||||
#[optimize(size)]
|
||||
pub fn size() {}
|
||||
|
||||
//@ is "$.index[?(@.name=='none')].attrs" '["#[attr = Optimize(DoNotOptimize)]"]'
|
||||
#[optimize(none)]
|
||||
pub fn none() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue