summaryrefslogtreecommitdiffstats
path: root/tests/ui/target-feature
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /tests/ui/target-feature
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/target-feature')
-rw-r--r--tests/ui/target-feature/gate.rs16
-rw-r--r--tests/ui/target-feature/gate.stderr2
-rw-r--r--tests/ui/target-feature/invalid-attribute.rs14
-rw-r--r--tests/ui/target-feature/invalid-attribute.stderr44
4 files changed, 27 insertions, 49 deletions
diff --git a/tests/ui/target-feature/gate.rs b/tests/ui/target-feature/gate.rs
index 8d1765eb8..782444417 100644
--- a/tests/ui/target-feature/gate.rs
+++ b/tests/ui/target-feature/gate.rs
@@ -1,16 +1,5 @@
-// ignore-arm
-// ignore-aarch64
-// ignore-wasm
-// ignore-emscripten
-// ignore-mips
-// ignore-mips64
-// ignore-powerpc
-// ignore-powerpc64
-// ignore-riscv64
-// ignore-sparc
-// ignore-sparc64
-// ignore-s390x
-// ignore-loongarch64
+// only-x86_64
+//
// gate-test-sse4a_target_feature
// gate-test-powerpc_target_feature
// gate-test-avx512_target_feature
@@ -28,6 +17,7 @@
// gate-test-ermsb_target_feature
// gate-test-bpf_target_feature
// gate-test-aarch64_ver_target_feature
+// gate-test-csky_target_feature
#[target_feature(enable = "avx512bw")]
//~^ ERROR: currently unstable
diff --git a/tests/ui/target-feature/gate.stderr b/tests/ui/target-feature/gate.stderr
index ee542b60a..f56efb3bb 100644
--- a/tests/ui/target-feature/gate.stderr
+++ b/tests/ui/target-feature/gate.stderr
@@ -1,5 +1,5 @@
error[E0658]: the target feature `avx512bw` is currently unstable
- --> $DIR/gate.rs:32:18
+ --> $DIR/gate.rs:22:18
|
LL | #[target_feature(enable = "avx512bw")]
| ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/target-feature/invalid-attribute.rs b/tests/ui/target-feature/invalid-attribute.rs
index 77fd8b85f..d1b3cf71c 100644
--- a/tests/ui/target-feature/invalid-attribute.rs
+++ b/tests/ui/target-feature/invalid-attribute.rs
@@ -1,16 +1,4 @@
-// ignore-arm
-// ignore-aarch64
-// ignore-wasm
-// ignore-emscripten
-// ignore-mips
-// ignore-mips64
-// ignore-powerpc
-// ignore-powerpc64
-// ignore-riscv64
-// ignore-s390x
-// ignore-sparc
-// ignore-sparc64
-// ignore-loongarch64
+// only-x86_64
#![warn(unused_attributes)]
diff --git a/tests/ui/target-feature/invalid-attribute.stderr b/tests/ui/target-feature/invalid-attribute.stderr
index 6d37d0917..29c73921c 100644
--- a/tests/ui/target-feature/invalid-attribute.stderr
+++ b/tests/ui/target-feature/invalid-attribute.stderr
@@ -1,11 +1,11 @@
error: malformed `target_feature` attribute input
- --> $DIR/invalid-attribute.rs:32:1
+ --> $DIR/invalid-attribute.rs:20:1
|
LL | #[target_feature = "+sse2"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[target_feature(enable = "name")]`
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:17:1
+ --> $DIR/invalid-attribute.rs:5:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -14,7 +14,7 @@ LL | extern crate alloc;
| ------------------- not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:22:1
+ --> $DIR/invalid-attribute.rs:10:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL | use alloc::alloc::alloc;
| ------------------------ not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:27:1
+ --> $DIR/invalid-attribute.rs:15:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -32,7 +32,7 @@ LL | extern "Rust" {}
| ---------------- not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:49:1
+ --> $DIR/invalid-attribute.rs:37:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -41,7 +41,7 @@ LL | mod another {}
| -------------- not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:54:1
+ --> $DIR/invalid-attribute.rs:42:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -50,7 +50,7 @@ LL | const FOO: usize = 7;
| --------------------- not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:59:1
+ --> $DIR/invalid-attribute.rs:47:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -59,7 +59,7 @@ LL | struct Foo;
| ----------- not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:64:1
+ --> $DIR/invalid-attribute.rs:52:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -68,7 +68,7 @@ LL | enum Bar {}
| ----------- not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:69:1
+ --> $DIR/invalid-attribute.rs:57:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -81,7 +81,7 @@ LL | | }
| |_- not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:77:1
+ --> $DIR/invalid-attribute.rs:65:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -90,7 +90,7 @@ LL | type Uwu = ();
| -------------- not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:82:1
+ --> $DIR/invalid-attribute.rs:70:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -99,7 +99,7 @@ LL | trait Baz {}
| ------------ not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:92:1
+ --> $DIR/invalid-attribute.rs:80:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -108,7 +108,7 @@ LL | static A: () = ();
| ------------------ not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:97:1
+ --> $DIR/invalid-attribute.rs:85:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -117,7 +117,7 @@ LL | impl Quux for u8 {}
| ------------------- not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:102:1
+ --> $DIR/invalid-attribute.rs:90:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -126,7 +126,7 @@ LL | impl Foo {}
| ----------- not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:120:5
+ --> $DIR/invalid-attribute.rs:108:5
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -138,7 +138,7 @@ LL | | }
| |_____- not a function definition
error: attribute should be applied to a function definition
- --> $DIR/invalid-attribute.rs:128:5
+ --> $DIR/invalid-attribute.rs:116:5
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -147,25 +147,25 @@ LL | || {};
| ----- not a function definition
error: the feature named `foo` is not valid for this target
- --> $DIR/invalid-attribute.rs:34:18
+ --> $DIR/invalid-attribute.rs:22:18
|
LL | #[target_feature(enable = "foo")]
| ^^^^^^^^^^^^^^ `foo` is not valid for this target
error: malformed `target_feature` attribute input
- --> $DIR/invalid-attribute.rs:37:18
+ --> $DIR/invalid-attribute.rs:25:18
|
LL | #[target_feature(bar)]
| ^^^ help: must be of the form: `enable = ".."`
error: malformed `target_feature` attribute input
- --> $DIR/invalid-attribute.rs:39:18
+ --> $DIR/invalid-attribute.rs:27:18
|
LL | #[target_feature(disable = "baz")]
| ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."`
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
- --> $DIR/invalid-attribute.rs:43:1
+ --> $DIR/invalid-attribute.rs:31:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -177,13 +177,13 @@ LL | fn bar() {}
= help: add `#![feature(target_feature_11)]` to the crate attributes to enable
error: cannot use `#[inline(always)]` with `#[target_feature]`
- --> $DIR/invalid-attribute.rs:87:1
+ --> $DIR/invalid-attribute.rs:75:1
|
LL | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
- --> $DIR/invalid-attribute.rs:112:5
+ --> $DIR/invalid-attribute.rs:100:5
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^