fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: borrow of moved value 2 --> $DIR/ref-pattern-binding.rs:10:9 3 | 4LL | let _moved @ ref _from = String::from("foo"); 5 | ^^^^^^ --------- value borrowed here after move 6 | | 7 | value moved into `_moved` here 8 | move occurs because `_moved` has type `String` which does not implement the `Copy` trait 9 | 10help: borrow this binding in the pattern to avoid moving the value 11 | 12LL | let ref _moved @ ref _from = String::from("foo"); 13 | +++ 14 15error: cannot move out of value because it is borrowed 16 --> $DIR/ref-pattern-binding.rs:11:9 17 | 18LL | let ref _moved @ _from = String::from("foo"); 19 | ^^^^^^^^^^ ----- value is moved into `_from` here 20 | | 21 | value is borrowed by `_moved` here 22 23error: cannot move out of value because it is borrowed 24 --> $DIR/ref-pattern-binding.rs:15:9 25 | 26LL | let ref _moved @ S { f } = S { f: String::from("foo") }; 27 | ^^^^^^^^^^ - value is moved into `f` here 28 | | 29 | value is borrowed by `_moved` here 30 31error: borrow of moved value 32 --> $DIR/ref-pattern-binding.rs:18:9 33 | 34LL | let _moved @ S { ref f } = S { f: String::from("foo") }; 35 | ^^^^^^ ----- value borrowed here after move 36 | | 37 | value moved into `_moved` here 38 | move occurs because `_moved` has type `S` which does not implement the `Copy` trait 39 | 40help: borrow this binding in the pattern to avoid moving the value 41 | 42LL | let ref _moved @ S { ref f } = S { f: String::from("foo") }; 43 | +++ 44 45error[E0382]: use of moved value 46 --> $DIR/ref-pattern-binding.rs:9:9 47 | 48LL | let _moved @ _from = String::from("foo"); 49 | ^^^^^^ ----- ------------------- move occurs because value has type `String`, which does not implement the `Copy` trait 50 | | | 51 | | value moved here 52 | value used here after move 53 | 54help: borrow this binding in the pattern to avoid moving the value 55 | 56LL | let ref _moved @ ref _from = String::from("foo"); 57 | +++ +++ 58 59error[E0382]: borrow of moved value 60 --> $DIR/ref-pattern-binding.rs:11:9 61 | 62LL | let ref _moved @ _from = String::from("foo"); 63 | ^^^^^^^^^^ ----- ------------------- move occurs because value has type `String`, which does not implement the `Copy` trait 64 | | | 65 | | value moved here 66 | value borrowed here after move 67 | 68help: borrow this binding in the pattern to avoid moving the value 69 | 70LL | let ref _moved @ ref _from = String::from("foo"); 71 | +++ 72 73error[E0382]: use of partially moved value 74 --> $DIR/ref-pattern-binding.rs:14:9 75 | 76LL | let _moved @ S { f } = S { f: String::from("foo") }; 77 | ^^^^^^ - value partially moved here 78 | | 79 | value used here after partial move 80 | 81 = note: partial move occurs because value has type `String`, which does not implement the `Copy` trait 82help: borrow this binding in the pattern to avoid moving the value 83 | 84LL | let ref _moved @ S { ref f } = S { f: String::from("foo") }; 85 | +++ +++ 86 87error[E0382]: borrow of partially moved value 88 --> $DIR/ref-pattern-binding.rs:15:9 89 | 90LL | let ref _moved @ S { f } = S { f: String::from("foo") }; 91 | ^^^^^^^^^^ - value partially moved here 92 | | 93 | value borrowed here after partial move 94 | 95 = note: partial move occurs because value has type `String`, which does not implement the `Copy` trait 96help: borrow this binding in the pattern to avoid moving the value 97 | 98LL | let ref _moved @ S { ref f } = S { f: String::from("foo") }; 99 | +++ 100 101error: aborting due to 8 previous errors 102 103For more information about this error, try `rustc --explain E0382`.