// revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] pub struct Vector([T; N]); pub type TruncatedVector = Vector; //[min]~^ ERROR generic parameters may not be used in const operations impl Vector { /// Drop the last component and return the vector with one fewer dimension. pub fn trunc(self) -> (TruncatedVector, T) { //[full]~^ ERROR constant expression depends on a generic parameter unimplemented!() } } fn vec4(a: T, b: T, c: T, d: T) -> Vector { Vector([a, b, c, d]) } fn main() { let (_xyz, _w): (TruncatedVector, u32) = vec4(0u32, 1, 2, 3).trunc(); }