summary refs log tree commit diff
path: root/src/test/ui/const-generics/defaults/needs-feature.rs
blob: 7eb7764a64449d0dc2636f2f779be460d6b3b2d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//[full] run-pass
// Verifies that having generic parameters after constants is not permitted without the
// `const_generics` feature.
// revisions: min full

#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]

struct A<const N: usize, T=u32>(T);
//[min]~^ ERROR type parameters must be declared prior

fn main() {
  let _: A<3> = A(0);
}