rust/src/test/compile-fail/issue-3177-mutable-struct.rs

12 lines
250 B
Rust
Raw Normal View History

2012-11-15 16:25:51 -06:00
// 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: () };
}