1 error: cannot move out of value because it is borrowed
2 --> $DIR/borrowck-pat-at-and-box.rs:37:9
4 LL | let ref a @ box b = Box::new(NC);
7 | | value moved into `b` here
8 | value borrowed, by `a`, here
10 error: cannot borrow value as mutable because it is also borrowed as immutable
11 --> $DIR/borrowck-pat-at-and-box.rs:39:9
13 LL | let ref a @ box ref mut b = Box::new(nc());
14 | -----^^^^^^^---------
16 | | mutable borrow, by `b`, occurs here
17 | immutable borrow, by `a`, occurs here
19 error: cannot borrow value as mutable because it is also borrowed as immutable
20 --> $DIR/borrowck-pat-at-and-box.rs:41:9
22 LL | let ref a @ box ref mut b = Box::new(NC);
23 | -----^^^^^^^---------
25 | | mutable borrow, by `b`, occurs here
26 | immutable borrow, by `a`, occurs here
28 error: cannot borrow value as mutable because it is also borrowed as immutable
29 --> $DIR/borrowck-pat-at-and-box.rs:43:9
31 LL | let ref a @ box ref mut b = Box::new(NC);
32 | -----^^^^^^^---------
34 | | mutable borrow, by `b`, occurs here
35 | immutable borrow, by `a`, occurs here
37 error: cannot borrow value as mutable because it is also borrowed as immutable
38 --> $DIR/borrowck-pat-at-and-box.rs:46:9
40 LL | let ref a @ box ref mut b = Box::new(NC);
41 | -----^^^^^^^---------
43 | | mutable borrow, by `b`, occurs here
44 | immutable borrow, by `a`, occurs here
46 error: cannot borrow value as immutable because it is also borrowed as mutable
47 --> $DIR/borrowck-pat-at-and-box.rs:52:9
49 LL | let ref mut a @ box ref b = Box::new(NC);
50 | ---------^^^^^^^-----
52 | | immutable borrow, by `b`, occurs here
53 | mutable borrow, by `a`, occurs here
55 error: cannot borrow value as immutable because it is also borrowed as mutable
56 --> $DIR/borrowck-pat-at-and-box.rs:66:9
58 LL | ref mut a @ box ref b => {
59 | ---------^^^^^^^-----
61 | | immutable borrow, by `b`, occurs here
62 | mutable borrow, by `a`, occurs here
64 error: cannot borrow value as immutable because it is also borrowed as mutable
65 --> $DIR/borrowck-pat-at-and-box.rs:58:11
67 LL | fn f5(ref mut a @ box ref b: Box<NC>) {
68 | ---------^^^^^^^-----
70 | | immutable borrow, by `b`, occurs here
71 | mutable borrow, by `a`, occurs here
73 error[E0382]: use of moved value
74 --> $DIR/borrowck-pat-at-and-box.rs:21:18
76 LL | let a @ box &b = Box::new(&C);
77 | ---------^ ------------ move occurs because value has type `std::boxed::Box<&C>`, which does not implement the `Copy` trait
79 | | value used here after move
82 error[E0382]: use of moved value
83 --> $DIR/borrowck-pat-at-and-box.rs:24:17
85 LL | let a @ box b = Box::new(C);
86 | --------^ ----------- move occurs because value has type `std::boxed::Box<C>`, which does not implement the `Copy` trait
88 | | value used here after move
91 error[E0382]: use of moved value
92 --> $DIR/borrowck-pat-at-and-box.rs:34:17
94 LL | match Box::new(C) {
95 | ----------- move occurs because value has type `std::boxed::Box<C>`, which does not implement the `Copy` trait
99 | | value used here after move
102 error[E0502]: cannot borrow `_` as mutable because it is also borrowed as immutable
103 --> $DIR/borrowck-pat-at-and-box.rs:46:21
105 LL | let ref a @ box ref mut b = Box::new(NC);
106 | ------------^^^^^^^^^
108 | | mutable borrow occurs here
109 | immutable borrow occurs here
112 | - immutable borrow later used here
114 error[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable
115 --> $DIR/borrowck-pat-at-and-box.rs:52:25
117 LL | let ref mut a @ box ref b = Box::new(NC);
118 | ----------------^^^^^
120 | | immutable borrow occurs here
121 | mutable borrow occurs here
123 LL | *a = Box::new(NC);
124 | -- mutable borrow later used here
126 error[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable
127 --> $DIR/borrowck-pat-at-and-box.rs:66:25
129 LL | ref mut a @ box ref b => {
130 | ----------------^^^^^
132 | | immutable borrow occurs here
133 | mutable borrow occurs here
135 LL | *a = Box::new(NC);
136 | -- mutable borrow later used here
138 error[E0382]: use of moved value
139 --> $DIR/borrowck-pat-at-and-box.rs:27:20
141 LL | fn f1(a @ box &b: Box<&C>) {}
144 | | value used here after move
146 | move occurs because value has type `std::boxed::Box<&C>`, which does not implement the `Copy` trait
148 error[E0382]: use of moved value
149 --> $DIR/borrowck-pat-at-and-box.rs:30:19
151 LL | fn f2(a @ box b: Box<C>) {}
154 | | value used here after move
156 | move occurs because value has type `std::boxed::Box<C>`, which does not implement the `Copy` trait
158 error[E0502]: cannot borrow `_` as immutable because it is also borrowed as mutable
159 --> $DIR/borrowck-pat-at-and-box.rs:58:27
161 LL | fn f5(ref mut a @ box ref b: Box<NC>) {
162 | ----------------^^^^^
164 | | immutable borrow occurs here
165 | mutable borrow occurs here
167 LL | *a = Box::new(NC);
168 | -- mutable borrow later used here
170 error: aborting due to 17 previous errors
172 Some errors have detailed explanations: E0382, E0502.
173 For more information about an error, try `rustc --explain E0382`.