1 error: borrow of moved value
2 --> $DIR/ref-pattern-binding.rs:10:9
4 LL | let _moved @ ref _from = String::from("foo");
7 | | value borrowed here after move
8 | value moved into `_moved` here
9 | move occurs because `_moved` has type `String` which does not implement the `Copy` trait
11 help: borrow this binding in the pattern to avoid moving the value
13 LL | let ref _moved @ ref _from = String::from("foo");
16 error: cannot move out of value because it is borrowed
17 --> $DIR/ref-pattern-binding.rs:11:9
19 LL | let ref _moved @ _from = String::from("foo");
22 | | value moved into `_from` here
23 | value borrowed, by `_moved`, here
25 error: cannot move out of value because it is borrowed
26 --> $DIR/ref-pattern-binding.rs:15:9
28 LL | let ref _moved @ S { f } = S { f: String::from("foo") };
29 | ----------^^^^^^^-^^
31 | | value moved into `f` here
32 | value borrowed, by `_moved`, here
34 error: borrow of moved value
35 --> $DIR/ref-pattern-binding.rs:18:9
37 LL | let _moved @ S { ref f } = S { f: String::from("foo") };
38 | ------^^^^^^^-----^^
40 | | value borrowed here after move
41 | value moved into `_moved` here
42 | move occurs because `_moved` has type `S` which does not implement the `Copy` trait
44 help: borrow this binding in the pattern to avoid moving the value
46 LL | let ref _moved @ S { ref f } = S { f: String::from("foo") };
49 error[E0382]: use of moved value
50 --> $DIR/ref-pattern-binding.rs:9:9
52 LL | let _moved @ _from = String::from("foo");
53 | ^^^^^^ ----- ------------------- move occurs because value has type `String`, which does not implement the `Copy` trait
56 | value used here after move
58 help: borrow this binding in the pattern to avoid moving the value
60 LL | let ref _moved @ ref _from = String::from("foo");
63 error[E0382]: borrow of moved value
64 --> $DIR/ref-pattern-binding.rs:11:9
66 LL | let ref _moved @ _from = String::from("foo");
67 | ^^^^^^^^^^ ----- ------------------- move occurs because value has type `String`, which does not implement the `Copy` trait
70 | value borrowed here after move
72 help: borrow this binding in the pattern to avoid moving the value
74 LL | let ref _moved @ ref _from = String::from("foo");
77 error[E0382]: use of partially moved value
78 --> $DIR/ref-pattern-binding.rs:14:9
80 LL | let _moved @ S { f } = S { f: String::from("foo") };
81 | ^^^^^^ - value partially moved here
83 | value used here after partial move
85 = note: partial move occurs because value has type `String`, which does not implement the `Copy` trait
86 help: borrow this binding in the pattern to avoid moving the value
88 LL | let ref _moved @ S { ref f } = S { f: String::from("foo") };
91 error[E0382]: borrow of partially moved value
92 --> $DIR/ref-pattern-binding.rs:15:9
94 LL | let ref _moved @ S { f } = S { f: String::from("foo") };
95 | ^^^^^^^^^^ - value partially moved here
97 | value borrowed here after partial move
99 = note: partial move occurs because value has type `String`, which does not implement the `Copy` trait
100 help: borrow this binding in the pattern to avoid moving the value
102 LL | let ref _moved @ S { ref f } = S { f: String::from("foo") };
105 error: aborting due to 8 previous errors
107 For more information about this error, try `rustc --explain E0382`.