summary refs log tree commit diff
path: root/src/test/ui/const-generics/defaults/complex-generic-default-expr.rs
blob: 814c996fbad6f50e88002ca6ee567cc22c132bc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// revisions: full min
//[full] check-pass
#![cfg_attr(full, feature(generic_const_exprs))]
#![feature(const_generics_defaults)]
#![allow(incomplete_features)]

struct Foo<const N: usize, const M: usize = { N + 1 }>;
//[min]~^ ERROR generic parameters may not be used in const operations

struct Bar<T, const TYPE_SIZE: usize = { std::mem::size_of::<T>() }>(T);
//[min]~^ ERROR generic parameters may not be used in const operations

fn main() {}