Skip to content

Commit a988708

Browse files
powerboat9P-E-P
authored andcommitted
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 <[email protected]>
1 parent f608c02 commit a988708

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

gcc/testsuite/rust/compile/const_generics_3.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
// { dg-additional-options "-w" }
1+
// { dg-additional-options "-w -frust-name-resolution-2.0" }
2+
3+
#[lang = "sized"]
4+
trait Sized {}
25

36
const M: usize = 4;
47

58
struct Foo<T, const N: usize = 1> {
6-
// FIXME: This error is bogus. But having it means parsing is valid!
7-
value: [i32; N], // { dg-error "cannot find value .N. in this scope" }
9+
value: [T; N],
810
}
911

1012
fn main() {

gcc/testsuite/rust/compile/nr2/exclude

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
canonical_paths1.rs
22
cfg1.rs
3-
const_generics_3.rs
43
generics9.rs
54
issue-2043.rs
65
issue-2330.rs

0 commit comments

Comments
 (0)