]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Adds and fixes tests for outer attributes in expression
authorlenny.chiadmi-delage <lenny.chiadmi-delage@epita.fr>
Tue, 6 Jan 2026 14:57:47 +0000 (14:57 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 16 Jan 2026 16:32:08 +0000 (17:32 +0100)
Adds test of issue 3904 and fix test of the issue 3874 to follows rust
1.49 behavior.

Fixes GCC-Rust/gccrs#3904

gcc/testsuite/ChangeLog:

* rust/compile/issue-3874.rs: Fixes test.
* rust/compile/issue-3904.rs: New test.

Signed-off-by: lenny.chiadmi-delage <lenny.chiadmi-delage@epita.fr>
gcc/testsuite/rust/compile/issue-3874.rs
gcc/testsuite/rust/compile/issue-3904.rs [new file with mode: 0644]

index ebce4b6da87d9c05da40e59e27523194ff883c93..811fd720916ffd9d5db5cc86037458409d6becb5 100644 (file)
@@ -1,4 +1,3 @@
 fn wow(){
     &#[serde]
-    // { dg-error "found unexpected token .#. in null denotation" "" { target *-*-* } .-1 }
-}
+} // { dg-error "found unexpected token .\}. in null denotation" "" { target *-*-* } . }
diff --git a/gcc/testsuite/rust/compile/issue-3904.rs b/gcc/testsuite/rust/compile/issue-3904.rs
new file mode 100644 (file)
index 0000000..457e0ef
--- /dev/null
@@ -0,0 +1 @@
+static STATIC_1: dyn = *#[serde()]; // { dg-error "found unexpected token .;. in null denotation" "" { target *-*-* } 0 }