diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-08-11 17:02:32 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-08-11 17:02:32 +0000 |
| commit | 32ee26c625e8fbb7a3aa56788cbb352f04491964 (patch) | |
| tree | 7aa1e7f03f7f47ce16b3405859d41e35f32bd945 /tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr | |
| parent | 413ca5d9f0868f5d91a8b773ce60d70d5205c3f3 (diff) | |
| download | rust-32ee26c625e8fbb7a3aa56788cbb352f04491964.tar.gz rust-32ee26c625e8fbb7a3aa56788cbb352f04491964.zip | |
Add more docs to templates for attrs with incorrect arguments
Diffstat (limited to 'tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr')
| -rw-r--r-- | tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr b/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr index 75e9b9209c0..6acde758ea5 100644 --- a/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr +++ b/tests/ui/conditional-compilation/cfg-attr-syntax-validation.stderr @@ -6,63 +6,73 @@ LL | #[cfg] | | | expected this to be a list | help: must be of the form: `#[cfg(predicate)]` + | + = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute> error[E0539]: malformed `cfg` attribute input - --> $DIR/cfg-attr-syntax-validation.rs:6:1 + --> $DIR/cfg-attr-syntax-validation.rs:7:1 | LL | #[cfg = 10] | ^^^^^^^^^^^ | | | expected this to be a list | help: must be of the form: `#[cfg(predicate)]` + | + = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute> error[E0805]: malformed `cfg` attribute input - --> $DIR/cfg-attr-syntax-validation.rs:11:1 + --> $DIR/cfg-attr-syntax-validation.rs:13:1 | LL | #[cfg()] | ^^^^^--^ | | | | | expected a single argument here | help: must be of the form: `#[cfg(predicate)]` + | + = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute> error[E0805]: malformed `cfg` attribute input - --> $DIR/cfg-attr-syntax-validation.rs:16:1 + --> $DIR/cfg-attr-syntax-validation.rs:19:1 | LL | #[cfg(a, b)] | ^^^^^------^ | | | | | expected a single argument here | help: must be of the form: `#[cfg(predicate)]` + | + = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute> error: `cfg` predicate key must be an identifier - --> $DIR/cfg-attr-syntax-validation.rs:21:7 + --> $DIR/cfg-attr-syntax-validation.rs:25:7 | LL | #[cfg("str")] | ^^^^^ error: `cfg` predicate key must be an identifier - --> $DIR/cfg-attr-syntax-validation.rs:24:7 + --> $DIR/cfg-attr-syntax-validation.rs:28:7 | LL | #[cfg(a::b)] | ^^^^ error[E0537]: invalid predicate `a` - --> $DIR/cfg-attr-syntax-validation.rs:27:7 + --> $DIR/cfg-attr-syntax-validation.rs:31:7 | LL | #[cfg(a())] | ^^^ error[E0539]: malformed `cfg` attribute input - --> $DIR/cfg-attr-syntax-validation.rs:30:1 + --> $DIR/cfg-attr-syntax-validation.rs:34:1 | LL | #[cfg(a = 10)] | ^^^^^^^^^^--^^ | | | | | expected a string literal here | help: must be of the form: `#[cfg(predicate)]` + | + = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute> error[E0539]: malformed `cfg` attribute input - --> $DIR/cfg-attr-syntax-validation.rs:34:1 + --> $DIR/cfg-attr-syntax-validation.rs:39:1 | LL | #[cfg(a = b"hi")] | ^^^^^^^^^^-^^^^^^ @@ -72,7 +82,7 @@ LL | #[cfg(a = b"hi")] = note: expected a normal string literal, not a byte string literal error: expected unsuffixed literal, found `expr` metavariable - --> $DIR/cfg-attr-syntax-validation.rs:40:25 + --> $DIR/cfg-attr-syntax-validation.rs:45:25 | LL | #[cfg(feature = $expr)] | ^^^^^ |
