2020-09-09 13:28:41 +02:00
|
|
|
// revisions: full min
|
|
|
|
|
#![cfg_attr(full, feature(const_generics))]
|
|
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
|
|
|
|
#![cfg_attr(min, feature(min_const_generics))]
|
2020-03-13 09:04:14 +09:00
|
|
|
|
|
|
|
|
use std::mem;
|
|
|
|
|
|
|
|
|
|
pub trait Trait {
|
|
|
|
|
type Associated: Sized;
|
|
|
|
|
|
|
|
|
|
fn associated_size(&self) -> usize {
|
|
|
|
|
[0u8; mem::size_of::<Self::Associated>()];
|
2020-09-09 13:28:41 +02:00
|
|
|
//[full]~^ ERROR constant expression depends on a generic parameter
|
2020-10-12 22:27:59 +01:00
|
|
|
//[min]~^^ ERROR generic parameters may not be used in const operations
|
2020-03-13 09:04:14 +09:00
|
|
|
0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|