blob: 9948982656357ace8b115c758f8f876e5ca9dfb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// revisions: full min
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]
fn ty_param<T>() -> [u8; std::mem::size_of::<T>()] {
//[full]~^ ERROR constant expression depends on a generic parameter
//[min]~^^ ERROR generic parameters may not be used in const operations
todo!()
}
fn const_param<const N: usize>() -> [u8; N + 1] {
//[full]~^ ERROR constant expression depends on a generic parameter
//[min]~^^ ERROR generic parameters may not be used in const operations
todo!()
}
fn main() {}
|