aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2025-03-20 12:17:20 -0400
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-31 21:07:15 +0200
commit17057c4e09aa76c7c3e9c2a14662b96d8963344b (patch)
tree16538239c94e70e0306502ab8f9cc90b235f7a1f /gcc
parentb31e1976cb0fe767db81febc6a30a6cc0b8f243a (diff)
downloadgcc-17057c4e09aa76c7c3e9c2a14662b96d8963344b.zip
gcc-17057c4e09aa76c7c3e9c2a14662b96d8963344b.tar.gz
gcc-17057c4e09aa76c7c3e9c2a14662b96d8963344b.tar.bz2
gccrs: nr2.0: Fix test const_generics_3.rs
gcc/testsuite/ChangeLog: * rust/compile/const_generics_3.rs: Modify test to run with name resolution 2.0 only and to handle the absence of a bogus resolution error. * rust/compile/nr2/exclude: Remove const_generics_3.rs. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/rust/compile/const_generics_3.rs8
-rw-r--r--gcc/testsuite/rust/compile/nr2/exclude1
2 files changed, 5 insertions, 4 deletions
diff --git a/gcc/testsuite/rust/compile/const_generics_3.rs b/gcc/testsuite/rust/compile/const_generics_3.rs
index e4e9008..524d48d 100644
--- a/gcc/testsuite/rust/compile/const_generics_3.rs
+++ b/gcc/testsuite/rust/compile/const_generics_3.rs
@@ -1,10 +1,12 @@
-// { dg-additional-options "-w" }
+// { dg-additional-options "-w -frust-name-resolution-2.0" }
+
+#[lang = "sized"]
+trait Sized {}
const M: usize = 4;
struct Foo<T, const N: usize = 1> {
- // FIXME: This error is bogus. But having it means parsing is valid!
- value: [i32; N], // { dg-error "cannot find value .N. in this scope" }
+ value: [T; N],
}
fn main() {
diff --git a/gcc/testsuite/rust/compile/nr2/exclude b/gcc/testsuite/rust/compile/nr2/exclude
index 45e90a4..71c2b68 100644
--- a/gcc/testsuite/rust/compile/nr2/exclude
+++ b/gcc/testsuite/rust/compile/nr2/exclude
@@ -1,6 +1,5 @@
canonical_paths1.rs
cfg1.rs
-const_generics_3.rs
generics9.rs
issue-2043.rs
issue-2330.rs