Skip to content

Commit 7df0327

Browse files
committed
add testcase for 87076
using #87076 (comment) as testcase
1 parent 10c0b00 commit 7df0327

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// build-pass
2+
3+
#![feature(const_generics)]
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+
}

0 commit comments

Comments
 (0)