]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
nr2.0: Fix test const_generics_3.rs
authorOwen Avery <powerboat9.gamer@gmail.com>
Thu, 20 Mar 2025 16:17:20 +0000 (12:17 -0400)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Tue, 25 Mar 2025 15:12:36 +0000 (15:12 +0000)
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>
gcc/testsuite/rust/compile/const_generics_3.rs
gcc/testsuite/rust/compile/nr2/exclude

index e4e9008c4a694214492420f7afe32374afc98356..524d48d5bcf5a32aa9c015c0c75e12953d0ef76b 100644 (file)
@@ -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() {
index 45e90a4df933d7e03d7df827f79abf93b7800c77..71c2b682bf02da40ce23458c00190cb1c663e11d 100644 (file)
@@ -1,6 +1,5 @@
 canonical_paths1.rs
 cfg1.rs
-const_generics_3.rs
 generics9.rs
 issue-2043.rs
 issue-2330.rs