1 error: cannot move out of value because it is borrowed
2 --> $DIR/borrowck-pat-at-and-box.rs:31: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:34: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:36: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:38: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:42: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:48: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:62: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:54: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:31:9
76 LL | let ref a @ box b = Box::new(NC);
77 | ^^^^^ - value moved here
79 | value borrowed here after move
81 = note: move occurs because value has type `NC`, which does not implement the `Copy` trait
82 help: borrow this binding in the pattern to avoid moving the value
84 LL | let ref a @ box ref b = Box::new(NC);
87 error[E0502]: cannot borrow value as immutable because it is also borrowed as mutable
88 --> $DIR/borrowck-pat-at-and-box.rs:38:9
90 LL | let ref a @ box ref mut b = Box::new(NC);
91 | ^^^^^ --------- mutable borrow occurs here
93 | immutable borrow occurs here
96 | ------- mutable borrow later used here
98 error[E0502]: cannot borrow value as immutable because it is also borrowed as mutable
99 --> $DIR/borrowck-pat-at-and-box.rs:42:9
101 LL | let ref a @ box ref mut b = Box::new(NC);
102 | ^^^^^ --------- mutable borrow occurs here
104 | immutable borrow occurs here
107 | ------- mutable borrow later used here
109 error[E0502]: cannot borrow value as mutable because it is also borrowed as immutable
110 --> $DIR/borrowck-pat-at-and-box.rs:48:9
112 LL | let ref mut a @ box ref b = Box::new(NC);
113 | ^^^^^^^^^ ----- 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:62:9
123 LL | ref mut a @ box ref b => {
124 | ^^^^^^^^^ ----- immutable borrow occurs here
126 | mutable borrow occurs here
129 | - immutable borrow later used here
131 error[E0502]: cannot borrow value as mutable because it is also borrowed as immutable
132 --> $DIR/borrowck-pat-at-and-box.rs:54:11
134 LL | fn f5(ref mut a @ box ref b: Box<NC>) {
135 | ^^^^^^^^^ ----- immutable borrow occurs here
137 | mutable borrow occurs here
140 | - immutable borrow later used here
142 error: aborting due to 14 previous errors
144 Some errors have detailed explanations: E0382, E0502.
145 For more information about an error, try `rustc --explain E0382`.