diff options
| author | Alona Enraght-Moony <code@alona.page> | 2025-06-23 17:02:13 +0000 |
|---|---|---|
| committer | Alona Enraght-Moony <code@alona.page> | 2025-06-23 17:23:20 +0000 |
| commit | bec2679e4e24aeed5e367ab710dc4fe8555f9eb8 (patch) | |
| tree | 2e47516fe5fb65aacba9aa637c8dbb61d81f700b | |
| parent | 42245d34d22ade32b3f276dcf74deb826841594c (diff) | |
| download | rust-bec2679e4e24aeed5e367ab710dc4fe8555f9eb8.tar.gz rust-bec2679e4e24aeed5e367ab710dc4fe8555f9eb8.zip | |
rustdoc-json: Add test for `#[optimize(..)]`
Follow up to https://www.github.com/rust-lang/rust/pull/138291
| -rw-r--r-- | tests/rustdoc-json/attrs/optimize.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/rustdoc-json/attrs/optimize.rs b/tests/rustdoc-json/attrs/optimize.rs new file mode 100644 index 00000000000..0bed0ad18c3 --- /dev/null +++ b/tests/rustdoc-json/attrs/optimize.rs @@ -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() {} |
