aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/const_generics_4.rs
blob: 2766e4ca3c5863a51e0b41ef37683c72b50af044 (plain)
1
2
3
4
5
6
7
// { dg-additional-options "-w" }

const P: usize = 14;

struct Foo<const N: usize = { M }>; // { dg-error "cannot find value .M. in this scope" }
struct Bar<const N: usize = { P }>;
struct Baz<const N: NotAType = { P }>; // { dg-error "could not resolve type path .NotAType." }