Debian Codegraph @

gcc/testsuite/rust/compile/const_generics_5.rs

raw
1 // { dg-options "-w" }
2 struct Foo<const N: usize = { 14 }>;
3
4 const M: usize = 15;
5 type N = Foo<3>;
6
7 fn main() {
8 let _: Foo<15> = Foo;
9 let _: Foo<{ M }> = Foo;
10 let _: Foo<M> = Foo;
11 // let _: Foo<N> = Foo; this causes an ICE we need to do const generics
12 }