1 error: cannot move out of value because it is borrowed
2 --> $DIR/borrowck-pat-at-and-box.rs:32: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:35: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:37: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:39: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:43: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:49: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:63: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:55: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]: borrow of moved value
74 --> $DIR/borrowck-pat-at-and-box.rs:32:9
76 LL | let ref a @ box b = Box::new(NC);
80 | value borrowed here after move
82 = note: move occurs because value has type `NC`, which does not implement the `Copy` trait
84 error[E0502]: cannot borrow value as immutable because it is also borrowed as mutable
85 --> $DIR/borrowck-pat-at-and-box.rs:39:9
87 LL | let ref a @ box ref mut b = Box::new(NC);
88 | ^^^^^^^^^^^^---------
90 | | mutable borrow occurs here
91 | immutable borrow occurs here
94 | ------- mutable borrow later used here
96 error[E0502]: cannot borrow value as immutable because it is also borrowed as mutable
97 --> $DIR/borrowck-pat-at-and-box.rs:43:9
99 LL | let ref a @ box ref mut b = Box::new(NC);
100 | ^^^^^^^^^^^^---------
102 | | mutable borrow occurs here
103 | immutable borrow occurs here
106 | ------- mutable borrow later used here
108 error[E0502]: cannot borrow value as mutable because it is also borrowed as immutable
109 --> $DIR/borrowck-pat-at-and-box.rs:49:9
111 LL | let ref mut a @ box ref b = Box::new(NC);
112 | ^^^^^^^^^^^^^^^^-----
114 | | immutable borrow occurs here
115 | mutable borrow occurs here
118 | - immutable borrow later used here
120 error[E0502]: cannot borrow value as mutable because it is also borrowed as immutable
121 --> $DIR/borrowck-pat-at-and-box.rs:63:9
123 LL | ref mut a @ box ref b => {
124 | ^^^^^^^^^^^^^^^^-----
126 | | immutable borrow occurs here
127 | mutable borrow occurs here
130 | - immutable borrow later used here
132 error[E0502]: cannot borrow value as mutable because it is also borrowed as immutable
133 --> $DIR/borrowck-pat-at-and-box.rs:55:11
135 LL | fn f5(ref mut a @ box ref b: Box<NC>) {
136 | ^^^^^^^^^^^^^^^^-----
138 | | immutable borrow occurs here
139 | mutable borrow occurs here
142 | - immutable borrow later used here
144 error: aborting due to 14 previous errors
146 Some errors have detailed explanations: E0382, E0502.
147 For more information about an error, try `rustc --explain E0382`.