We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f81e4c commit 35b2960Copy full SHA for 35b2960
src/test/compile-fail/issue-3177-mutable-struct.rs
@@ -0,0 +1,11 @@
1
+// xfail-test
2
+// error-pattern: instantiating a type parameter with an incompatible type
3
+struct S<T: Const> {
4
+ s: T,
5
+ mut cant_nest: ()
6
+}
7
+
8
+fn main() {
9
+ let a1 = ~S{ s: true, cant_nest: () };
10
+ let _a2 = ~S{ s: move a1, cant_nest: () };
11
0 commit comments