We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10c0b00 commit 7df0327Copy full SHA for 7df0327
src/test/ui/const-generics/issues/issue-87076.rs
@@ -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