Add another test for #3177
This commit is contained in:
parent
1f81e4cbc6
commit
35b2960d00
11
src/test/compile-fail/issue-3177-mutable-struct.rs
Normal file
11
src/test/compile-fail/issue-3177-mutable-struct.rs
Normal file
@ -0,0 +1,11 @@
|
||||
// xfail-test
|
||||
// error-pattern: instantiating a type parameter with an incompatible type
|
||||
struct S<T: Const> {
|
||||
s: T,
|
||||
mut cant_nest: ()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let a1 = ~S{ s: true, cant_nest: () };
|
||||
let _a2 = ~S{ s: move a1, cant_nest: () };
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user