|
| 1 | +#![crate_name = "foo"] |
| 2 | + |
| 3 | +//@ has 'foo/index.html' |
| 4 | + |
| 5 | +//@ has - '//dl[@class="item-table"]/dt[1]//a' 'f1_safe' |
| 6 | +//@ has - '//dl[@class="item-table"]/dt[1]//code' 'popcnt' |
| 7 | +//@ count - '//dl[@class="item-table"]/dt[1]//sup' 0 |
| 8 | +//@ has - '//dl[@class="item-table"]/dt[2]//a' 'f2_not_safe' |
| 9 | +//@ has - '//dl[@class="item-table"]/dt[2]//code' 'avx2' |
| 10 | +//@ count - '//dl[@class="item-table"]/dt[2]//sup' 1 |
| 11 | +//@ has - '//dl[@class="item-table"]/dt[2]//sup' '⚠' |
| 12 | + |
| 13 | +#[target_feature(enable = "popcnt")] |
| 14 | +//@ has 'foo/fn.f1_safe.html' |
| 15 | +//@ has - '//pre[@class="rust item-decl"]' 'pub fn f1_safe()' |
| 16 | +//@ has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \ |
| 17 | +// 'Available with target feature popcnt only.' |
| 18 | +pub fn f1_safe() {} |
| 19 | + |
| 20 | +//@ has 'foo/fn.f2_not_safe.html' |
| 21 | +//@ has - '//pre[@class="rust item-decl"]' 'pub unsafe fn f2_not_safe()' |
| 22 | +//@ has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \ |
| 23 | +// 'Available with target feature avx2 only.' |
| 24 | +#[target_feature(enable = "avx2")] |
| 25 | +pub unsafe fn f2_not_safe() {} |
| 26 | + |
| 27 | +//@ has 'foo/fn.f3_multifeatures_in_attr.html' |
| 28 | +//@ has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \ |
| 29 | +// 'Available on target features popcnt and avx2 only.' |
| 30 | +#[target_feature(enable = "popcnt", enable = "avx2")] |
| 31 | +pub fn f3_multifeatures_in_attr() {} |
| 32 | + |
| 33 | +//@ has 'foo/fn.f4_multi_attrs.html' |
| 34 | +//@ has - '//*[@id="main-content"]/*[@class="item-info"]/*[@class="stab portability"]' \ |
| 35 | +// 'Available on target features popcnt and avx2 only.' |
| 36 | +#[target_feature(enable = "popcnt")] |
| 37 | +#[target_feature(enable = "avx2")] |
| 38 | +pub fn f4_multi_attrs() {} |
0 commit comments