2020-09-14 16:39:43 -05:00
|
|
|
// 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
|
2020-10-12 16:27:59 -05:00
|
|
|
//[min]~^^ ERROR generic parameters may not be used in const operations
|
2020-09-14 16:39:43 -05:00
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn const_param<const N: usize>() -> [u8; N + 1] {
|
|
|
|
//[full]~^ ERROR constant expression depends on a generic parameter
|
2020-10-12 16:27:59 -05:00
|
|
|
//[min]~^^ ERROR generic parameters may not be used in const operations
|
2020-09-14 16:39:43 -05:00
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|