]> git.proxmox.com Git - rustc.git/blob - src/test/ui/trivial-bounds/trivial-bounds-leak-copy.nll.stderr
New upstream version 1.31.0~beta.4+dfsg1
[rustc.git] / src / test / ui / trivial-bounds / trivial-bounds-leak-copy.nll.stderr
1 error[E0507]: cannot move out of borrowed content
2 --> $DIR/trivial-bounds-leak-copy.rs:19:5
3 |
4 LL | *t //~ ERROR
5 | ^^ cannot move out of borrowed content
6
7 error[E0507]: cannot move out of `*t` which is behind a `&` reference
8 --> $DIR/trivial-bounds-leak-copy.rs:19:5
9 |
10 LL | fn move_out_string(t: &String) -> String {
11 | ------- help: consider changing this to be a mutable reference: `&mut std::string::String`
12 LL | *t //~ ERROR
13 | ^^
14 | |
15 | cannot move out of `*t` which is behind a `&` reference
16 | `t` is a `&` reference, so the data it refers to cannot be moved
17
18 error: aborting due to 2 previous errors
19
20 For more information about this error, try `rustc --explain E0507`.