about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/feature-gates/feature-gate-cfg-target-abi.rs4
-rw-r--r--src/test/ui/feature-gates/feature-gate-cfg-target-abi.stderr16
-rw-r--r--src/test/ui/proc-macro/cfg-eval-fail.rs2
-rw-r--r--src/test/ui/proc-macro/cfg-eval-fail.stderr14
4 files changed, 12 insertions, 24 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-cfg-target-abi.rs b/src/test/ui/feature-gates/feature-gate-cfg-target-abi.rs
index f2651493980..d005dc3ad45 100644
--- a/src/test/ui/feature-gates/feature-gate-cfg-target-abi.rs
+++ b/src/test/ui/feature-gates/feature-gate-cfg-target-abi.rs
@@ -1,7 +1,9 @@
 #[cfg(target_abi = "x")] //~ ERROR `cfg(target_abi)` is experimental
-#[cfg_attr(target_abi = "x", x)] //~ ERROR `cfg(target_abi)` is experimental
 struct Foo(u64, u64);
 
+#[cfg_attr(target_abi = "x", x)] //~ ERROR `cfg(target_abi)` is experimental
+struct Bar(u64, u64);
+
 #[cfg(not(any(all(target_abi = "x"))))] //~ ERROR `cfg(target_abi)` is experimental
 fn foo() {}
 
diff --git a/src/test/ui/feature-gates/feature-gate-cfg-target-abi.stderr b/src/test/ui/feature-gates/feature-gate-cfg-target-abi.stderr
index ed8cbcbe4f0..013705d4886 100644
--- a/src/test/ui/feature-gates/feature-gate-cfg-target-abi.stderr
+++ b/src/test/ui/feature-gates/feature-gate-cfg-target-abi.stderr
@@ -1,23 +1,23 @@
 error[E0658]: `cfg(target_abi)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-abi.rs:2:12
+  --> $DIR/feature-gate-cfg-target-abi.rs:1:7
    |
-LL | #[cfg_attr(target_abi = "x", x)]
-   |            ^^^^^^^^^^^^^^^^
+LL | #[cfg(target_abi = "x")]
+   |       ^^^^^^^^^^^^^^^^
    |
    = note: see issue #80970 <https://github.com/rust-lang/rust/issues/80970> for more information
    = help: add `#![feature(cfg_target_abi)]` to the crate attributes to enable
 
 error[E0658]: `cfg(target_abi)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-abi.rs:1:7
+  --> $DIR/feature-gate-cfg-target-abi.rs:4:12
    |
-LL | #[cfg(target_abi = "x")]
-   |       ^^^^^^^^^^^^^^^^
+LL | #[cfg_attr(target_abi = "x", x)]
+   |            ^^^^^^^^^^^^^^^^
    |
    = note: see issue #80970 <https://github.com/rust-lang/rust/issues/80970> for more information
    = help: add `#![feature(cfg_target_abi)]` to the crate attributes to enable
 
 error[E0658]: `cfg(target_abi)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-abi.rs:5:19
+  --> $DIR/feature-gate-cfg-target-abi.rs:7:19
    |
 LL | #[cfg(not(any(all(target_abi = "x"))))]
    |                   ^^^^^^^^^^^^^^^^
@@ -26,7 +26,7 @@ LL | #[cfg(not(any(all(target_abi = "x"))))]
    = help: add `#![feature(cfg_target_abi)]` to the crate attributes to enable
 
 error[E0658]: `cfg(target_abi)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-abi.rs:9:10
+  --> $DIR/feature-gate-cfg-target-abi.rs:11:10
    |
 LL |     cfg!(target_abi = "x");
    |          ^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/proc-macro/cfg-eval-fail.rs b/src/test/ui/proc-macro/cfg-eval-fail.rs
index 379491f3126..a259aa2e6ec 100644
--- a/src/test/ui/proc-macro/cfg-eval-fail.rs
+++ b/src/test/ui/proc-macro/cfg-eval-fail.rs
@@ -4,6 +4,4 @@
 fn main() {
     let _ = #[cfg_eval] #[cfg(FALSE)] 0;
     //~^ ERROR removing an expression is not supported in this position
-    //~| ERROR removing an expression is not supported in this position
-    //~| ERROR removing an expression is not supported in this position
 }
diff --git a/src/test/ui/proc-macro/cfg-eval-fail.stderr b/src/test/ui/proc-macro/cfg-eval-fail.stderr
index 010ac006b0b..df8b6d5f382 100644
--- a/src/test/ui/proc-macro/cfg-eval-fail.stderr
+++ b/src/test/ui/proc-macro/cfg-eval-fail.stderr
@@ -4,17 +4,5 @@ error: removing an expression is not supported in this position
 LL |     let _ = #[cfg_eval] #[cfg(FALSE)] 0;
    |                         ^^^^^^^^^^^^^
 
-error: removing an expression is not supported in this position
-  --> $DIR/cfg-eval-fail.rs:5:25
-   |
-LL |     let _ = #[cfg_eval] #[cfg(FALSE)] 0;
-   |                         ^^^^^^^^^^^^^
-
-error: removing an expression is not supported in this position
-  --> $DIR/cfg-eval-fail.rs:5:25
-   |
-LL |     let _ = #[cfg_eval] #[cfg(FALSE)] 0;
-   |                         ^^^^^^^^^^^^^
-
-error: aborting due to 3 previous errors
+error: aborting due to previous error