2020-09-14 23:39:43 +02:00
|
|
|
// revisions: full min
|
|
|
|
|
#![cfg_attr(full, feature(const_generics))]
|
|
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
|
|
|
|
#![cfg_attr(min, feature(min_const_generics))]
|
|
|
|
|
|
|
|
|
|
fn ty_param<T>() -> [u8; std::mem::size_of::<T>()] {
|
|
|
|
|
//[full]~^ ERROR constant expression depends on a generic parameter
|
2020-10-11 16:47:45 +01:00
|
|
|
//[min]~^^ ERROR generic parameters must not be used inside const evaluations
|
2020-09-14 23:39:43 +02:00
|
|
|
todo!()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn const_param<const N: usize>() -> [u8; N + 1] {
|
|
|
|
|
//[full]~^ ERROR constant expression depends on a generic parameter
|
2020-10-11 16:47:45 +01:00
|
|
|
//[min]~^^ ERROR generic parameters must not be used inside const evaluations
|
2020-09-14 23:39:43 +02:00
|
|
|
todo!()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|