2021-07-19 00:24:07 -05:00
|
|
|
// build-pass
|
|
|
|
|
2021-08-30 03:59:53 -05:00
|
|
|
#![feature(adt_const_params)]
|
2021-07-19 00:24:07 -05:00
|
|
|
#![allow(incomplete_features)]
|
|
|
|
|
|
|
|
#[derive(PartialEq, Eq)]
|
|
|
|
pub struct UnitDims {
|
|
|
|
pub time: u8,
|
|
|
|
pub length: u8,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct UnitValue<const DIMS: UnitDims>;
|
|
|
|
|
|
|
|
impl<const DIMS: UnitDims> UnitValue<DIMS> {
|
|
|
|
fn crash() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
UnitValue::<{ UnitDims { time: 1, length: 2 } }>::crash();
|
|
|
|
}
|