blob: 1e2c2968c4b7aef54066556d366c265d76492365 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// Test that mixing `Copy` and non-`Copy` types in `@` patterns is forbidden.
#[derive(Copy, Clone)]
struct C;
struct NC<A, B>(A, B);
fn main() {
// this compiles
let a @ NC(b, c) = NC(C, C);
let a @ NC(b, c @ NC(d, e)) = NC(C, NC(C, C));
//~^ ERROR use of partially moved value
}
|