summary refs log tree commit diff
path: root/src/test/ui/const-generics/defaults/simple-defaults.rs
blob: 78abe3519985b49f95763a5b74dd0dcda767a43f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// [full] run-pass
// revisions: min full
// Checks some basic test cases for defaults.
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(min, feature(min_const_generics))]
#![allow(dead_code)]

struct FixedOutput<'a, const N: usize, T=u32> {
  //[min]~^ ERROR type parameters must be declared prior to const parameters
  out: &'a [T; N],
}

trait FixedOutputter {
  fn out(&self) -> FixedOutput<'_, 10>;
}

fn main() {}