about summary refs log tree commit diff
path: root/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr')
-rw-r--r--tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr63
1 files changed, 40 insertions, 23 deletions
diff --git a/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr b/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr
index 66ce2ee9858..75e9b9209c0 100644
--- a/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr
+++ b/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr
@@ -1,61 +1,78 @@
-error: `cfg` is not followed by parentheses
+error[E0539]: malformed `cfg` attribute input
   --> $DIR/cfg-attr-syntax-validation.rs:1:1
    |
 LL | #[cfg]
-   | ^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
+   | ^^^^^^
+   | |
+   | expected this to be a list
+   | help: must be of the form: `#[cfg(predicate)]`
 
-error: `cfg` is not followed by parentheses
-  --> $DIR/cfg-attr-syntax-validation.rs:4:1
+error[E0539]: malformed `cfg` attribute input
+  --> $DIR/cfg-attr-syntax-validation.rs:6:1
    |
 LL | #[cfg = 10]
-   | ^^^^^^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
+   | ^^^^^^^^^^^
+   | |
+   | expected this to be a list
+   | help: must be of the form: `#[cfg(predicate)]`
 
-error: `cfg` predicate is not specified
-  --> $DIR/cfg-attr-syntax-validation.rs:7:1
+error[E0805]: malformed `cfg` attribute input
+  --> $DIR/cfg-attr-syntax-validation.rs:11:1
    |
 LL | #[cfg()]
-   | ^^^^^^^^ help: expected syntax is: `cfg(/* predicate */)`
+   | ^^^^^--^
+   | |    |
+   | |    expected a single argument here
+   | help: must be of the form: `#[cfg(predicate)]`
 
-error: multiple `cfg` predicates are specified
-  --> $DIR/cfg-attr-syntax-validation.rs:10:10
+error[E0805]: malformed `cfg` attribute input
+  --> $DIR/cfg-attr-syntax-validation.rs:16:1
    |
 LL | #[cfg(a, b)]
-   |          ^
+   | ^^^^^------^
+   | |    |
+   | |    expected a single argument here
+   | help: must be of the form: `#[cfg(predicate)]`
 
-error: `cfg` predicate key cannot be a literal
-  --> $DIR/cfg-attr-syntax-validation.rs:13:7
+error: `cfg` predicate key must be an identifier
+  --> $DIR/cfg-attr-syntax-validation.rs:21:7
    |
 LL | #[cfg("str")]
    |       ^^^^^
 
 error: `cfg` predicate key must be an identifier
-  --> $DIR/cfg-attr-syntax-validation.rs:16:7
+  --> $DIR/cfg-attr-syntax-validation.rs:24:7
    |
 LL | #[cfg(a::b)]
    |       ^^^^
 
 error[E0537]: invalid predicate `a`
-  --> $DIR/cfg-attr-syntax-validation.rs:19:7
+  --> $DIR/cfg-attr-syntax-validation.rs:27:7
    |
 LL | #[cfg(a())]
    |       ^^^
 
-error[E0565]: literal in `cfg` predicate value must be a string
-  --> $DIR/cfg-attr-syntax-validation.rs:22:11
+error[E0539]: malformed `cfg` attribute input
+  --> $DIR/cfg-attr-syntax-validation.rs:30:1
    |
 LL | #[cfg(a = 10)]
-   |           ^^
+   | ^^^^^^^^^^--^^
+   | |         |
+   | |         expected a string literal here
+   | help: must be of the form: `#[cfg(predicate)]`
 
-error[E0565]: literal in `cfg` predicate value must be a string
-  --> $DIR/cfg-attr-syntax-validation.rs:25:11
+error[E0539]: malformed `cfg` attribute input
+  --> $DIR/cfg-attr-syntax-validation.rs:34:1
    |
 LL | #[cfg(a = b"hi")]
-   |           -^^^^
+   | ^^^^^^^^^^-^^^^^^
    |           |
    |           help: consider removing the prefix
+   |
+   = note: expected a normal string literal, not a byte string literal
 
 error: expected unsuffixed literal, found `expr` metavariable
-  --> $DIR/cfg-attr-syntax-validation.rs:30:25
+  --> $DIR/cfg-attr-syntax-validation.rs:40:25
    |
 LL |         #[cfg(feature = $expr)]
    |                         ^^^^^
@@ -67,5 +84,5 @@ LL | generate_s10!(concat!("nonexistent"));
 
 error: aborting due to 10 previous errors
 
-Some errors have detailed explanations: E0537, E0565.
+Some errors have detailed explanations: E0537, E0539, E0805.
 For more information about an error, try `rustc --explain E0537`.