We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04cb196 commit a39c50bCopy full SHA for a39c50b
src/test/ui/const-generics/issues/issue-89304.rs
@@ -0,0 +1,20 @@
1
+// check-pass
2
+
3
+#![feature(generic_const_exprs)]
4
+#![allow(incomplete_features)]
5
6
+struct GenericStruct<const T: usize> { val: i64 }
7
8
+impl<const T: usize> From<GenericStruct<T>> for GenericStruct<{T + 1}> {
9
+ fn from(other: GenericStruct<T>) -> Self {
10
+ Self { val: other.val }
11
+ }
12
+}
13
14
+impl<const T: usize> From<GenericStruct<{T + 1}>> for GenericStruct<T> {
15
+ fn from(other: GenericStruct<{T + 1}>) -> Self {
16
17
18
19
20
+fn main() {}
0 commit comments