mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
rustdoc-json: Add test for #[optimize(..)]
Follow up to https://www.github.com/rust-lang/rust/pull/138291
This commit is contained in:
@@ -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() {}
|
||||
Reference in New Issue
Block a user