diff --git a/tests/ui/cfg/both-true-false.rs b/tests/ui/cfg/both-true-false.rs index 5fca8f654ad8e..62a4ef6a2dbe9 100644 --- a/tests/ui/cfg/both-true-false.rs +++ b/tests/ui/cfg/both-true-false.rs @@ -1,5 +1,6 @@ /// Test that placing a `cfg(true)` and `cfg(false)` on the same item result in //. it being disabled.` +//@ reference: cfg.attr.duplicates #[cfg(false)] #[cfg(true)] diff --git a/tests/ui/cfg/both-true-false.stderr b/tests/ui/cfg/both-true-false.stderr index 1a7c509aec0c7..76a5661f0873d 100644 --- a/tests/ui/cfg/both-true-false.stderr +++ b/tests/ui/cfg/both-true-false.stderr @@ -1,11 +1,11 @@ error[E0425]: cannot find function `foo` in this scope - --> $DIR/both-true-false.rs:13:5 + --> $DIR/both-true-false.rs:14:5 | LL | foo(); | ^^^ not found in this scope | note: found an item that was configured out - --> $DIR/both-true-false.rs:6:4 + --> $DIR/both-true-false.rs:7:4 | LL | #[cfg(false)] | ----- the item is gated here @@ -13,7 +13,7 @@ LL | #[cfg(true)] LL | fn foo() {} | ^^^ note: found an item that was configured out - --> $DIR/both-true-false.rs:10:4 + --> $DIR/both-true-false.rs:11:4 | LL | #[cfg(false)] | ----- the item is gated here diff --git a/tests/ui/cfg/cfg-false-use-item.rs b/tests/ui/cfg/cfg-false-use-item.rs index d37b48cdedb77..d907e17a0c11d 100644 --- a/tests/ui/cfg/cfg-false-use-item.rs +++ b/tests/ui/cfg/cfg-false-use-item.rs @@ -1,6 +1,8 @@ //! Test that use items with cfg(false) are properly filtered out //@ run-pass +//@ reference: cfg.predicate.literal +//@ reference: cfg.attr.effect pub fn main() { // Make sure that this view item is filtered out because otherwise it would diff --git a/tests/ui/cfg/cfg-family.rs b/tests/ui/cfg/cfg-family.rs index a13ae7f9616bf..60594c7105f7b 100644 --- a/tests/ui/cfg/cfg-family.rs +++ b/tests/ui/cfg/cfg-family.rs @@ -1,6 +1,8 @@ //@ build-pass //@ ignore-wasm32 no bare family //@ ignore-sgx +//@ reference: cfg.target_family.unix +//@ reference: cfg.target_family.windows #[cfg(windows)] pub fn main() { diff --git a/tests/ui/cfg/cfg-panic-abort.rs b/tests/ui/cfg/cfg-panic-abort.rs index b39888573b3a6..af4e119ef9fe3 100644 --- a/tests/ui/cfg/cfg-panic-abort.rs +++ b/tests/ui/cfg/cfg-panic-abort.rs @@ -2,6 +2,8 @@ //@ compile-flags: -C panic=abort //@ no-prefer-dynamic //@ ignore-backends: gcc +//@ reference: cfg.panic.def +//@ reference: cfg.panic.values #[cfg(panic = "unwind")] pub fn bad() -> i32 { } diff --git a/tests/ui/cfg/cfg-panic.rs b/tests/ui/cfg/cfg-panic.rs index 4e3ed0cd9c2f8..7c911c5754e72 100644 --- a/tests/ui/cfg/cfg-panic.rs +++ b/tests/ui/cfg/cfg-panic.rs @@ -1,6 +1,8 @@ //@ build-pass //@ compile-flags: -C panic=unwind //@ needs-unwind +//@ reference: cfg.panic.def +//@ reference: cfg.panic.values #[cfg(panic = "abort")] pub fn bad() -> i32 { } diff --git a/tests/ui/cfg/cfg-path-error.rs b/tests/ui/cfg/cfg-path-error.rs index f22e6be32f3e1..9bb10d3a6f6a1 100644 --- a/tests/ui/cfg/cfg-path-error.rs +++ b/tests/ui/cfg/cfg-path-error.rs @@ -1,4 +1,5 @@ //@ check-fail +//@ reference: cfg.option-spec #![allow(unexpected_cfgs)] // invalid cfgs diff --git a/tests/ui/cfg/cfg-path-error.stderr b/tests/ui/cfg/cfg-path-error.stderr index bb9b7039c8a34..f3b0a2d3c28e3 100644 --- a/tests/ui/cfg/cfg-path-error.stderr +++ b/tests/ui/cfg/cfg-path-error.stderr @@ -1,5 +1,5 @@ error[E0539]: malformed `cfg` attribute input - --> $DIR/cfg-path-error.rs:5:1 + --> $DIR/cfg-path-error.rs:6:1 | LL | #[cfg(any(foo, foo::bar))] | ^^^^^^^^^^^^^^^--------^^^ @@ -10,7 +10,7 @@ LL | #[cfg(any(foo, foo::bar))] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/cfg-path-error.rs:11:1 + --> $DIR/cfg-path-error.rs:12:1 | LL | #[cfg(any(foo::bar, foo))] | ^^^^^^^^^^--------^^^^^^^^ @@ -21,7 +21,7 @@ LL | #[cfg(any(foo::bar, foo))] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/cfg-path-error.rs:17:1 + --> $DIR/cfg-path-error.rs:18:1 | LL | #[cfg(all(foo, foo::bar))] | ^^^^^^^^^^^^^^^--------^^^ @@ -32,7 +32,7 @@ LL | #[cfg(all(foo, foo::bar))] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/cfg-path-error.rs:23:1 + --> $DIR/cfg-path-error.rs:24:1 | LL | #[cfg(all(foo::bar, foo))] | ^^^^^^^^^^--------^^^^^^^^ diff --git a/tests/ui/cfg/cfg-target-abi.rs b/tests/ui/cfg/cfg-target-abi.rs index 306ae077325b4..b001071185171 100644 --- a/tests/ui/cfg/cfg-target-abi.rs +++ b/tests/ui/cfg/cfg-target-abi.rs @@ -1,4 +1,6 @@ //@ run-pass +//@ reference: cfg.target_abi.def +//@ reference: cfg.target_abi.values #[cfg(target_abi = "eabihf")] pub fn main() { diff --git a/tests/ui/cfg/cfg-target-family.rs b/tests/ui/cfg/cfg-target-family.rs index 0b1c323307a9b..33dc5b1e82423 100644 --- a/tests/ui/cfg/cfg-target-family.rs +++ b/tests/ui/cfg/cfg-target-family.rs @@ -1,5 +1,7 @@ //@ build-pass //@ ignore-sgx +//@ reference: cfg.target_family.def +//@ reference: cfg.target_family.values #[cfg(target_family = "windows")] diff --git a/tests/ui/cfg/cfg-target-vendor.rs b/tests/ui/cfg/cfg-target-vendor.rs index e5de95d04e54e..04dfbdb064d0d 100644 --- a/tests/ui/cfg/cfg-target-vendor.rs +++ b/tests/ui/cfg/cfg-target-vendor.rs @@ -1,4 +1,6 @@ //@ run-pass +//@ reference: cfg.target_vendor.def +//@ reference: cfg.target_vendor.values #[cfg(target_vendor = "unknown")] pub fn main() { } diff --git a/tests/ui/cfg/cfg_attr.rs b/tests/ui/cfg/cfg_attr.rs index ba4adafd3a568..1fab79c5e1f22 100644 --- a/tests/ui/cfg/cfg_attr.rs +++ b/tests/ui/cfg/cfg_attr.rs @@ -1,5 +1,7 @@ //@ run-pass //@ compile-flags:--cfg set1 --cfg set2 +//@ reference: cfg.cfg_attr.intro +//@ reference: cfg.cfg_attr.syntax #![allow(dead_code, unexpected_cfgs)] diff --git a/tests/ui/cfg/cfg_false_no_std-1.rs b/tests/ui/cfg/cfg_false_no_std-1.rs index 17286e219b866..7f8a43ecdfed7 100644 --- a/tests/ui/cfg/cfg_false_no_std-1.rs +++ b/tests/ui/cfg/cfg_false_no_std-1.rs @@ -2,6 +2,7 @@ //@ check-pass //@ aux-build: cfg_false_lib_no_std_after.rs +//@ reference: cfg.attr.crate-level-attrs #![no_std] diff --git a/tests/ui/cfg/cfg_false_no_std-2.rs b/tests/ui/cfg/cfg_false_no_std-2.rs index 666c90deaf0f4..a3816f0e15511 100644 --- a/tests/ui/cfg/cfg_false_no_std-2.rs +++ b/tests/ui/cfg/cfg_false_no_std-2.rs @@ -7,6 +7,7 @@ //@ compile-flags: -Cpanic=abort //@ aux-build: cfg_false_lib_no_std_before.rs +//@ reference: cfg.attr.crate-level-attrs #![no_std] diff --git a/tests/ui/cfg/cfg_false_no_std.rs b/tests/ui/cfg/cfg_false_no_std.rs index 910f3f8b9ae1f..08032c5a91e6f 100644 --- a/tests/ui/cfg/cfg_false_no_std.rs +++ b/tests/ui/cfg/cfg_false_no_std.rs @@ -2,6 +2,7 @@ //@ check-pass //@ aux-build: cfg_false_lib.rs +//@ reference: cfg.attr.crate-level-attrs #![no_std] diff --git a/tests/ui/cfg/cfg_stmt_expr.rs b/tests/ui/cfg/cfg_stmt_expr.rs index 361b159a354fd..8681f87b5b30f 100644 --- a/tests/ui/cfg/cfg_stmt_expr.rs +++ b/tests/ui/cfg/cfg_stmt_expr.rs @@ -1,4 +1,5 @@ //@ run-pass +//@ reference: cfg.attr.allowed-positions #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_variables)] diff --git a/tests/ui/cfg/cfgs-on-items.rs b/tests/ui/cfg/cfgs-on-items.rs index 8992a8fca9c38..56f87350fea2c 100644 --- a/tests/ui/cfg/cfgs-on-items.rs +++ b/tests/ui/cfg/cfgs-on-items.rs @@ -1,5 +1,8 @@ //@ run-pass //@ compile-flags: --cfg fooA --cfg fooB --check-cfg=cfg(fooA,fooB,fooC,bar) +//@ reference: cfg.predicate.all +//@ reference: cfg.predicate.any +//@ reference: cfg.predicate.not // fooA AND !bar #[cfg(all(fooA, not(bar)))] diff --git a/tests/ui/cfg/conditional-compile-arch.rs b/tests/ui/cfg/conditional-compile-arch.rs index f16805474074d..0d57a50be530d 100644 --- a/tests/ui/cfg/conditional-compile-arch.rs +++ b/tests/ui/cfg/conditional-compile-arch.rs @@ -1,4 +1,6 @@ //@ run-pass +//@ reference: cfg.target_arch.def +//@ reference: cfg.target_arch.values #[cfg(target_arch = "x86")] pub fn main() { } diff --git a/tests/ui/cfg/conditional-compile.rs b/tests/ui/cfg/conditional-compile.rs index 8761197891f5e..637bd0e12e8be 100644 --- a/tests/ui/cfg/conditional-compile.rs +++ b/tests/ui/cfg/conditional-compile.rs @@ -1,4 +1,5 @@ //@ run-pass +//@ reference: cfg.attr.allowed-positions #![allow(dead_code)] #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] diff --git a/tests/ui/cfg/crate-attributes-using-cfg_attr.rs b/tests/ui/cfg/crate-attributes-using-cfg_attr.rs index f99fad881f284..6dbc59ccc4edc 100644 --- a/tests/ui/cfg/crate-attributes-using-cfg_attr.rs +++ b/tests/ui/cfg/crate-attributes-using-cfg_attr.rs @@ -1,5 +1,6 @@ //@ check-fail //@ compile-flags:--cfg foo --check-cfg=cfg(foo) +//@ reference: cfg.cfg_attr.attr-restriction #![cfg_attr(foo, crate_type="bin")] //~^ERROR `crate_type` within diff --git a/tests/ui/cfg/crate-attributes-using-cfg_attr.stderr b/tests/ui/cfg/crate-attributes-using-cfg_attr.stderr index 1dfca2b88d0e5..3d6f007605026 100644 --- a/tests/ui/cfg/crate-attributes-using-cfg_attr.stderr +++ b/tests/ui/cfg/crate-attributes-using-cfg_attr.stderr @@ -1,17 +1,17 @@ error: `crate_type` within an `#![cfg_attr]` attribute is forbidden - --> $DIR/crate-attributes-using-cfg_attr.rs:4:18 + --> $DIR/crate-attributes-using-cfg_attr.rs:5:18 | LL | #![cfg_attr(foo, crate_type="bin")] | ^^^^^^^^^^^^^^^^ error: `crate_name` within an `#![cfg_attr]` attribute is forbidden - --> $DIR/crate-attributes-using-cfg_attr.rs:7:18 + --> $DIR/crate-attributes-using-cfg_attr.rs:8:18 | LL | #![cfg_attr(foo, crate_name="bar")] | ^^^^^^^^^^^^^^^^ error: `crate_type` within an `#![cfg_attr]` attribute is forbidden - --> $DIR/crate-attributes-using-cfg_attr.rs:4:18 + --> $DIR/crate-attributes-using-cfg_attr.rs:5:18 | LL | #![cfg_attr(foo, crate_type="bin")] | ^^^^^^^^^^^^^^^^ @@ -19,7 +19,7 @@ LL | #![cfg_attr(foo, crate_type="bin")] = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: `crate_name` within an `#![cfg_attr]` attribute is forbidden - --> $DIR/crate-attributes-using-cfg_attr.rs:7:18 + --> $DIR/crate-attributes-using-cfg_attr.rs:8:18 | LL | #![cfg_attr(foo, crate_name="bar")] | ^^^^^^^^^^^^^^^^ diff --git a/tests/ui/cfg/invalid-cli-cfg-pred.rs b/tests/ui/cfg/invalid-cli-cfg-pred.rs index fdfb6b18d96b6..817362a40f3de 100644 --- a/tests/ui/cfg/invalid-cli-cfg-pred.rs +++ b/tests/ui/cfg/invalid-cli-cfg-pred.rs @@ -1,4 +1,7 @@ //@ compile-flags: --cfg foo=1x +//@ reference: cfg.option-spec +//@ reference: cfg.option-name +//@ reference: cfg.option-key-value fn main() {} diff --git a/tests/ui/cfg/invalid-cli-check-cfg-pred.rs b/tests/ui/cfg/invalid-cli-check-cfg-pred.rs index 30417a912bfcf..d5a40f4398364 100644 --- a/tests/ui/cfg/invalid-cli-check-cfg-pred.rs +++ b/tests/ui/cfg/invalid-cli-check-cfg-pred.rs @@ -1,4 +1,7 @@ //@ compile-flags: --check-cfg 'foo=1x' +//@ reference: cfg.option-spec +//@ reference: cfg.option-name +//@ reference: cfg.option-key-value fn main() {} diff --git a/tests/ui/cfg/path-kw-as-cfg-pred.rs b/tests/ui/cfg/path-kw-as-cfg-pred.rs index d3b419175163f..f161e60385b4b 100644 --- a/tests/ui/cfg/path-kw-as-cfg-pred.rs +++ b/tests/ui/cfg/path-kw-as-cfg-pred.rs @@ -1,4 +1,6 @@ //@ edition: 2024 +//@ reference: cfg.attr.syntax +//@ reference: cfg.cfg_attr.syntax #![allow(unexpected_cfgs)] diff --git a/tests/ui/cfg/path-kw-as-cfg-pred.stderr b/tests/ui/cfg/path-kw-as-cfg-pred.stderr index f0bc0b67b9339..b10149dd09640 100644 --- a/tests/ui/cfg/path-kw-as-cfg-pred.stderr +++ b/tests/ui/cfg/path-kw-as-cfg-pred.stderr @@ -1,125 +1,125 @@ error: `crate` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:70:10 + --> $DIR/path-kw-as-cfg-pred.rs:72:10 | LL | cfg!(r#crate); | ^^^^^^^ error: `super` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:72:10 + --> $DIR/path-kw-as-cfg-pred.rs:74:10 | LL | cfg!(r#super); | ^^^^^^^ error: `self` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:74:10 + --> $DIR/path-kw-as-cfg-pred.rs:76:10 | LL | cfg!(r#self); | ^^^^^^ error: `Self` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:76:10 + --> $DIR/path-kw-as-cfg-pred.rs:78:10 | LL | cfg!(r#Self); | ^^^^^^ error: `_` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:85:10 + --> $DIR/path-kw-as-cfg-pred.rs:87:10 | LL | cfg!(r#_); | ^^^ error: `crate` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:88:7 + --> $DIR/path-kw-as-cfg-pred.rs:90:7 | LL | #[cfg(r#crate)] | ^^^^^^^ error: `super` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:91:7 + --> $DIR/path-kw-as-cfg-pred.rs:93:7 | LL | #[cfg(r#super)] | ^^^^^^^ error: `self` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:94:7 + --> $DIR/path-kw-as-cfg-pred.rs:96:7 | LL | #[cfg(r#self)] | ^^^^^^ error: `Self` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:97:7 + --> $DIR/path-kw-as-cfg-pred.rs:99:7 | LL | #[cfg(r#Self)] | ^^^^^^ error: `crate` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:100:12 + --> $DIR/path-kw-as-cfg-pred.rs:102:12 | LL | #[cfg_attr(r#crate, cfg(r#crate))] | ^^^^^^^ error: `crate` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:100:25 + --> $DIR/path-kw-as-cfg-pred.rs:102:25 | LL | #[cfg_attr(r#crate, cfg(r#crate))] | ^^^^^^^ error: `super` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:104:12 + --> $DIR/path-kw-as-cfg-pred.rs:106:12 | LL | #[cfg_attr(r#super, cfg(r#super))] | ^^^^^^^ error: `super` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:104:25 + --> $DIR/path-kw-as-cfg-pred.rs:106:25 | LL | #[cfg_attr(r#super, cfg(r#super))] | ^^^^^^^ error: `self` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:108:12 + --> $DIR/path-kw-as-cfg-pred.rs:110:12 | LL | #[cfg_attr(r#self, cfg(r#self))] | ^^^^^^ error: `self` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:108:24 + --> $DIR/path-kw-as-cfg-pred.rs:110:24 | LL | #[cfg_attr(r#self, cfg(r#self))] | ^^^^^^ error: `Self` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:112:12 + --> $DIR/path-kw-as-cfg-pred.rs:114:12 | LL | #[cfg_attr(r#Self, cfg(r#Self))] | ^^^^^^ error: `Self` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:112:24 + --> $DIR/path-kw-as-cfg-pred.rs:114:24 | LL | #[cfg_attr(r#Self, cfg(r#Self))] | ^^^^^^ error: `_` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:121:7 + --> $DIR/path-kw-as-cfg-pred.rs:123:7 | LL | #[cfg(r#_)] | ^^^ error: `_` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:127:12 + --> $DIR/path-kw-as-cfg-pred.rs:129:12 | LL | #[cfg_attr(r#_, cfg(r#_))] | ^^^ error: `_` cannot be a raw identifier - --> $DIR/path-kw-as-cfg-pred.rs:127:21 + --> $DIR/path-kw-as-cfg-pred.rs:129:21 | LL | #[cfg_attr(r#_, cfg(r#_))] | ^^^ error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:18:1 + --> $DIR/path-kw-as-cfg-pred.rs:20:1 | LL | #[cfg(crate)] | ^^^^^^-----^^ @@ -130,7 +130,7 @@ LL | #[cfg(crate)] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:20:1 + --> $DIR/path-kw-as-cfg-pred.rs:22:1 | LL | #[cfg(super)] | ^^^^^^-----^^ @@ -141,7 +141,7 @@ LL | #[cfg(super)] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:22:1 + --> $DIR/path-kw-as-cfg-pred.rs:24:1 | LL | #[cfg(self)] | ^^^^^^----^^ @@ -152,7 +152,7 @@ LL | #[cfg(self)] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:24:1 + --> $DIR/path-kw-as-cfg-pred.rs:26:1 | LL | #[cfg(Self)] | ^^^^^^----^^ @@ -163,7 +163,7 @@ LL | #[cfg(Self)] = note: for more information, visit error[E0539]: malformed `cfg_attr` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:26:1 + --> $DIR/path-kw-as-cfg-pred.rs:28:1 | LL | #[cfg_attr(crate, path = "foo")] | ^^^^^^^^^^^-----^^^^^^^^^^^^^^^^ @@ -174,7 +174,7 @@ LL | #[cfg_attr(crate, path = "foo")] = note: for more information, visit error[E0539]: malformed `cfg_attr` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:28:1 + --> $DIR/path-kw-as-cfg-pred.rs:30:1 | LL | #[cfg_attr(super, path = "foo")] | ^^^^^^^^^^^-----^^^^^^^^^^^^^^^^ @@ -185,7 +185,7 @@ LL | #[cfg_attr(super, path = "foo")] = note: for more information, visit error[E0539]: malformed `cfg_attr` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:30:1 + --> $DIR/path-kw-as-cfg-pred.rs:32:1 | LL | #[cfg_attr(self, path = "foo")] | ^^^^^^^^^^^----^^^^^^^^^^^^^^^^ @@ -196,7 +196,7 @@ LL | #[cfg_attr(self, path = "foo")] = note: for more information, visit error[E0539]: malformed `cfg_attr` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:32:1 + --> $DIR/path-kw-as-cfg-pred.rs:34:1 | LL | #[cfg_attr(Self, path = "foo")] | ^^^^^^^^^^^----^^^^^^^^^^^^^^^^ @@ -207,7 +207,7 @@ LL | #[cfg_attr(Self, path = "foo")] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:34:18 + --> $DIR/path-kw-as-cfg-pred.rs:36:18 | LL | #[cfg_attr(true, cfg(crate))] | ^^^^-----^ @@ -218,7 +218,7 @@ LL | #[cfg_attr(true, cfg(crate))] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:36:18 + --> $DIR/path-kw-as-cfg-pred.rs:38:18 | LL | #[cfg_attr(true, cfg(super))] | ^^^^-----^ @@ -229,7 +229,7 @@ LL | #[cfg_attr(true, cfg(super))] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:38:18 + --> $DIR/path-kw-as-cfg-pred.rs:40:18 | LL | #[cfg_attr(true, cfg(self))] | ^^^^----^ @@ -240,7 +240,7 @@ LL | #[cfg_attr(true, cfg(self))] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:40:18 + --> $DIR/path-kw-as-cfg-pred.rs:42:18 | LL | #[cfg_attr(true, cfg(Self))] | ^^^^----^ @@ -251,25 +251,25 @@ LL | #[cfg_attr(true, cfg(Self))] = note: for more information, visit error: expected identifier, found keyword `struct` - --> $DIR/path-kw-as-cfg-pred.rs:43:7 + --> $DIR/path-kw-as-cfg-pred.rs:45:7 | LL | #[cfg(struct)] | ^^^^^^ expected identifier, found keyword error: expected identifier, found reserved keyword `priv` - --> $DIR/path-kw-as-cfg-pred.rs:45:7 + --> $DIR/path-kw-as-cfg-pred.rs:47:7 | LL | #[cfg(priv)] | ^^^^ expected identifier, found reserved keyword error: expected identifier, found reserved identifier `_` - --> $DIR/path-kw-as-cfg-pred.rs:47:7 + --> $DIR/path-kw-as-cfg-pred.rs:49:7 | LL | #[cfg(_)] | ^ expected identifier, found reserved identifier error: expected identifier, found keyword `struct` - --> $DIR/path-kw-as-cfg-pred.rs:49:12 + --> $DIR/path-kw-as-cfg-pred.rs:51:12 | LL | #[cfg_attr(struct, path = "foo")] | ^^^^^^ expected identifier, found keyword @@ -280,7 +280,7 @@ LL | #[cfg_attr(r#struct, path = "foo")] | ++ error: expected identifier, found reserved keyword `priv` - --> $DIR/path-kw-as-cfg-pred.rs:51:12 + --> $DIR/path-kw-as-cfg-pred.rs:53:12 | LL | #[cfg_attr(priv, path = "foo")] | ^^^^ expected identifier, found reserved keyword @@ -291,31 +291,31 @@ LL | #[cfg_attr(r#priv, path = "foo")] | ++ error: expected identifier, found reserved identifier `_` - --> $DIR/path-kw-as-cfg-pred.rs:53:12 + --> $DIR/path-kw-as-cfg-pred.rs:55:12 | LL | #[cfg_attr(_, path = "foo")] | ^ expected identifier, found reserved identifier error: expected identifier, found keyword `struct` - --> $DIR/path-kw-as-cfg-pred.rs:55:22 + --> $DIR/path-kw-as-cfg-pred.rs:57:22 | LL | #[cfg_attr(true, cfg(struct))] | ^^^^^^ expected identifier, found keyword error: expected identifier, found reserved keyword `priv` - --> $DIR/path-kw-as-cfg-pred.rs:57:22 + --> $DIR/path-kw-as-cfg-pred.rs:59:22 | LL | #[cfg_attr(true, cfg(priv))] | ^^^^ expected identifier, found reserved keyword error: expected identifier, found reserved identifier `_` - --> $DIR/path-kw-as-cfg-pred.rs:59:22 + --> $DIR/path-kw-as-cfg-pred.rs:61:22 | LL | #[cfg_attr(true, cfg(_))] | ^ expected identifier, found reserved identifier error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:88:1 + --> $DIR/path-kw-as-cfg-pred.rs:90:1 | LL | #[cfg(r#crate)] | ^^^^^^-------^^ @@ -326,7 +326,7 @@ LL | #[cfg(r#crate)] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:91:1 + --> $DIR/path-kw-as-cfg-pred.rs:93:1 | LL | #[cfg(r#super)] | ^^^^^^-------^^ @@ -337,7 +337,7 @@ LL | #[cfg(r#super)] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:94:1 + --> $DIR/path-kw-as-cfg-pred.rs:96:1 | LL | #[cfg(r#self)] | ^^^^^^------^^ @@ -348,7 +348,7 @@ LL | #[cfg(r#self)] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:97:1 + --> $DIR/path-kw-as-cfg-pred.rs:99:1 | LL | #[cfg(r#Self)] | ^^^^^^------^^ @@ -359,7 +359,7 @@ LL | #[cfg(r#Self)] = note: for more information, visit error[E0539]: malformed `cfg_attr` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:100:1 + --> $DIR/path-kw-as-cfg-pred.rs:102:1 | LL | #[cfg_attr(r#crate, cfg(r#crate))] | ^^^^^^^^^^^-------^^^^^^^^^^^^^^^^ @@ -370,7 +370,7 @@ LL | #[cfg_attr(r#crate, cfg(r#crate))] = note: for more information, visit error[E0539]: malformed `cfg_attr` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:104:1 + --> $DIR/path-kw-as-cfg-pred.rs:106:1 | LL | #[cfg_attr(r#super, cfg(r#super))] | ^^^^^^^^^^^-------^^^^^^^^^^^^^^^^ @@ -381,7 +381,7 @@ LL | #[cfg_attr(r#super, cfg(r#super))] = note: for more information, visit error[E0539]: malformed `cfg_attr` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:108:1 + --> $DIR/path-kw-as-cfg-pred.rs:110:1 | LL | #[cfg_attr(r#self, cfg(r#self))] | ^^^^^^^^^^^------^^^^^^^^^^^^^^^ @@ -392,7 +392,7 @@ LL | #[cfg_attr(r#self, cfg(r#self))] = note: for more information, visit error[E0539]: malformed `cfg_attr` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:112:1 + --> $DIR/path-kw-as-cfg-pred.rs:114:1 | LL | #[cfg_attr(r#Self, cfg(r#Self))] | ^^^^^^^^^^^------^^^^^^^^^^^^^^^ @@ -403,7 +403,7 @@ LL | #[cfg_attr(r#Self, cfg(r#Self))] = note: for more information, visit error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:7:9 + --> $DIR/path-kw-as-cfg-pred.rs:9:9 | LL | #[cfg($crate)] | ^^^^^^------^^ @@ -418,7 +418,7 @@ LL | foo!(); = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0539]: malformed `cfg_attr` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:9:9 + --> $DIR/path-kw-as-cfg-pred.rs:11:9 | LL | #[cfg_attr($crate, path = "foo")] | ^^^^^^^^^^^------^^^^^^^^^^^^^^^^ @@ -433,7 +433,7 @@ LL | foo!(); = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0539]: malformed `cfg` attribute input - --> $DIR/path-kw-as-cfg-pred.rs:11:26 + --> $DIR/path-kw-as-cfg-pred.rs:13:26 | LL | #[cfg_attr(true, cfg($crate))] | ^^^^------^ @@ -448,7 +448,7 @@ LL | foo!(); = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0539]: malformed `cfg` macro input - --> $DIR/path-kw-as-cfg-pred.rs:14:9 + --> $DIR/path-kw-as-cfg-pred.rs:16:9 | LL | cfg!($crate); | ^^^^^------^ @@ -463,7 +463,7 @@ LL | foo!(); = note: this error originates in the macro `cfg` which comes from the expansion of the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0539]: malformed `cfg` macro input - --> $DIR/path-kw-as-cfg-pred.rs:65:5 + --> $DIR/path-kw-as-cfg-pred.rs:67:5 | LL | cfg!(crate); | ^^^^^-----^ @@ -474,7 +474,7 @@ LL | cfg!(crate); = note: for more information, visit error[E0539]: malformed `cfg` macro input - --> $DIR/path-kw-as-cfg-pred.rs:66:5 + --> $DIR/path-kw-as-cfg-pred.rs:68:5 | LL | cfg!(super); | ^^^^^-----^ @@ -485,7 +485,7 @@ LL | cfg!(super); = note: for more information, visit error[E0539]: malformed `cfg` macro input - --> $DIR/path-kw-as-cfg-pred.rs:67:5 + --> $DIR/path-kw-as-cfg-pred.rs:69:5 | LL | cfg!(self); | ^^^^^----^ @@ -496,7 +496,7 @@ LL | cfg!(self); = note: for more information, visit error[E0539]: malformed `cfg` macro input - --> $DIR/path-kw-as-cfg-pred.rs:68:5 + --> $DIR/path-kw-as-cfg-pred.rs:70:5 | LL | cfg!(Self); | ^^^^^----^ @@ -507,7 +507,7 @@ LL | cfg!(Self); = note: for more information, visit error[E0539]: malformed `cfg` macro input - --> $DIR/path-kw-as-cfg-pred.rs:70:5 + --> $DIR/path-kw-as-cfg-pred.rs:72:5 | LL | cfg!(r#crate); | ^^^^^-------^ @@ -518,7 +518,7 @@ LL | cfg!(r#crate); = note: for more information, visit error[E0539]: malformed `cfg` macro input - --> $DIR/path-kw-as-cfg-pred.rs:72:5 + --> $DIR/path-kw-as-cfg-pred.rs:74:5 | LL | cfg!(r#super); | ^^^^^-------^ @@ -529,7 +529,7 @@ LL | cfg!(r#super); = note: for more information, visit error[E0539]: malformed `cfg` macro input - --> $DIR/path-kw-as-cfg-pred.rs:74:5 + --> $DIR/path-kw-as-cfg-pred.rs:76:5 | LL | cfg!(r#self); | ^^^^^------^ @@ -540,7 +540,7 @@ LL | cfg!(r#self); = note: for more information, visit error[E0539]: malformed `cfg` macro input - --> $DIR/path-kw-as-cfg-pred.rs:76:5 + --> $DIR/path-kw-as-cfg-pred.rs:78:5 | LL | cfg!(r#Self); | ^^^^^------^ @@ -551,19 +551,19 @@ LL | cfg!(r#Self); = note: for more information, visit error: expected identifier, found keyword `struct` - --> $DIR/path-kw-as-cfg-pred.rs:79:10 + --> $DIR/path-kw-as-cfg-pred.rs:81:10 | LL | cfg!(struct); | ^^^^^^ expected identifier, found keyword error: expected identifier, found reserved keyword `priv` - --> $DIR/path-kw-as-cfg-pred.rs:80:10 + --> $DIR/path-kw-as-cfg-pred.rs:82:10 | LL | cfg!(priv); | ^^^^ expected identifier, found reserved keyword error: expected identifier, found reserved identifier `_` - --> $DIR/path-kw-as-cfg-pred.rs:81:10 + --> $DIR/path-kw-as-cfg-pred.rs:83:10 | LL | cfg!(_); | ^ expected identifier, found reserved identifier diff --git a/tests/ui/cfg/true-false.rs b/tests/ui/cfg/true-false.rs index 0bd1cf427fafd..b8e0e8968c83e 100644 --- a/tests/ui/cfg/true-false.rs +++ b/tests/ui/cfg/true-false.rs @@ -1,4 +1,5 @@ //@ run-pass +//@ reference: cfg.predicate.literal #![feature(link_cfg)]