]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/issues/issue-87076.rs
Rollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-Simulacrum
[rust.git] / tests / ui / const-generics / issues / issue-87076.rs
1 // build-pass
2
3 #![feature(adt_const_params)]
4 #![allow(incomplete_features)]
5
6 #[derive(PartialEq, Eq)]
7 pub struct UnitDims {
8     pub time: u8,
9     pub length: u8,
10 }
11
12 pub struct UnitValue<const DIMS: UnitDims>;
13
14 impl<const DIMS: UnitDims> UnitValue<DIMS> {
15     fn crash() {}
16 }
17
18 fn main() {
19     UnitValue::<{ UnitDims { time: 1, length: 2 } }>::crash();
20 }