summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/issues/issue-87076.rs
blob: 8a567678b824e34d615830db87dd381c17337ddf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// build-pass

#![feature(adt_const_params)]
#![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();
}