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>
This commit is contained in:
Owen Avery 2025-03-20 12:17:20 -04:00 committed by Arthur Cohen
parent b31e1976cb
commit 17057c4e09
2 changed files with 5 additions and 4 deletions

View 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() {

View file

@ -1,6 +1,5 @@
canonical_paths1.rs
cfg1.rs
const_generics_3.rs
generics9.rs
issue-2043.rs
issue-2330.rs