summaryrefslogtreecommitdiffstats
path: root/tests/ui/conditional-compilation/cfg-non-opt-expr.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/conditional-compilation/cfg-non-opt-expr.stderr')
-rw-r--r--tests/ui/conditional-compilation/cfg-non-opt-expr.stderr20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/conditional-compilation/cfg-non-opt-expr.stderr b/tests/ui/conditional-compilation/cfg-non-opt-expr.stderr
new file mode 100644
index 000000000..933b7dc18
--- /dev/null
+++ b/tests/ui/conditional-compilation/cfg-non-opt-expr.stderr
@@ -0,0 +1,20 @@
+error: removing an expression is not supported in this position
+ --> $DIR/cfg-non-opt-expr.rs:5:13
+ |
+LL | let _ = #[cfg(unset)] ();
+ | ^^^^^^^^^^^^^
+
+error: removing an expression is not supported in this position
+ --> $DIR/cfg-non-opt-expr.rs:7:21
+ |
+LL | let _ = 1 + 2 + #[cfg(unset)] 3;
+ | ^^^^^^^^^^^^^
+
+error: removing an expression is not supported in this position
+ --> $DIR/cfg-non-opt-expr.rs:9:23
+ |
+LL | let _ = [1, 2, 3][#[cfg(unset)] 1];
+ | ^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+