about summary refs log tree commit diff
path: root/src/test/ui/const-generics/struct-with-invalid-const-param.rs
blob: f0122ace3aec3a5c97e71a69d918c5a79b299746 (plain)
1
2
3
4
5
6
7
8
9
10
// Checks that a const param cannot be stored in a struct.
// revisions: full min

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

struct S<const C: u8>(C); //~ ERROR expected type, found const parameter

fn main() {}