Skip to content

Commit 9d85006

Browse files
Added apxf target feature test
1 parent 1ea80ce commit 9d85006

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

tests/ui/check-cfg/target_feature.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ LL | cfg!(target_feature = "_UNEXPECTED_VALUE");
2727
`amx-tf32`
2828
`amx-tile`
2929
`amx-transpose`
30+
`apxf`
3031
`atomics`
3132
`avx`
3233
`avx2`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//@ only-x86_64
2+
#[target_feature(enable = "apxf")]
3+
//~^ ERROR: currently unstable
4+
unsafe fn foo() {}
5+
6+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
error[E0658]: the target feature `apxf` is currently unstable
2+
--> $DIR/feature-gate-apx-target-feature.rs:2:18
3+
|
4+
LL | #[target_feature(enable = "apxf")]
5+
| ^^^^^^^^^^^^^^^
6+
|
7+
= note: see issue #139284 <https://github.com/rust-lang/rust/issues/139284> for more information
8+
= help: add `#![feature(apx_target_feature)]` to the crate attributes to enable
9+
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10+
11+
error: aborting due to 1 previous error
12+
13+
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)