about summary refs log tree commit diff
path: root/tests/ui/parser/attribute
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2024-04-07 00:33:37 +0200
committerUrgau <urgau@numericable.fr>2024-05-04 11:30:38 +0200
commitd4e26fbb5301b465a037c4d2ff54024ebd7f73d8 (patch)
treed88675775f0531d394efd16a5906d9440b30875f /tests/ui/parser/attribute
parent517374150cfb48e907aec059f3639eba3a9c1e1c (diff)
downloadrust-d4e26fbb5301b465a037c4d2ff54024ebd7f73d8.tar.gz
rust-d4e26fbb5301b465a037c4d2ff54024ebd7f73d8.zip
compiletest: add enable-by-default check-cfg
Diffstat (limited to 'tests/ui/parser/attribute')
-rw-r--r--tests/ui/parser/attribute/attr-unquoted-ident.fixed2
-rw-r--r--tests/ui/parser/attribute/attr-unquoted-ident.rs2
-rw-r--r--tests/ui/parser/attribute/attr-unquoted-ident.stderr4
3 files changed, 6 insertions, 2 deletions
diff --git a/tests/ui/parser/attribute/attr-unquoted-ident.fixed b/tests/ui/parser/attribute/attr-unquoted-ident.fixed
index 636508b5615..bc861ef69fb 100644
--- a/tests/ui/parser/attribute/attr-unquoted-ident.fixed
+++ b/tests/ui/parser/attribute/attr-unquoted-ident.fixed
@@ -1,6 +1,8 @@
 //@ compile-flags: -Zdeduplicate-diagnostics=yes
 //@ run-rustfix
 
+#![allow(unexpected_cfgs)]
+
 fn main() {
     #[cfg(key="foo")]
     //~^ ERROR expected unsuffixed literal, found `foo`
diff --git a/tests/ui/parser/attribute/attr-unquoted-ident.rs b/tests/ui/parser/attribute/attr-unquoted-ident.rs
index 9b9a9f78403..8bdb8605ebb 100644
--- a/tests/ui/parser/attribute/attr-unquoted-ident.rs
+++ b/tests/ui/parser/attribute/attr-unquoted-ident.rs
@@ -1,6 +1,8 @@
 //@ compile-flags: -Zdeduplicate-diagnostics=yes
 //@ run-rustfix
 
+#![allow(unexpected_cfgs)]
+
 fn main() {
     #[cfg(key=foo)]
     //~^ ERROR expected unsuffixed literal, found `foo`
diff --git a/tests/ui/parser/attribute/attr-unquoted-ident.stderr b/tests/ui/parser/attribute/attr-unquoted-ident.stderr
index bc028f39be6..99484a51110 100644
--- a/tests/ui/parser/attribute/attr-unquoted-ident.stderr
+++ b/tests/ui/parser/attribute/attr-unquoted-ident.stderr
@@ -1,5 +1,5 @@
 error: expected unsuffixed literal, found `foo`
-  --> $DIR/attr-unquoted-ident.rs:5:15
+  --> $DIR/attr-unquoted-ident.rs:7:15
    |
 LL |     #[cfg(key=foo)]
    |               ^^^
@@ -10,7 +10,7 @@ LL |     #[cfg(key="foo")]
    |               +   +
 
 error: expected unsuffixed literal, found `foo`
-  --> $DIR/attr-unquoted-ident.rs:11:15
+  --> $DIR/attr-unquoted-ident.rs:13:15
    |
 LL |     #[cfg(key=foo bar baz)]
    |               ^^^