| error[E0507]: cannot move out of borrowed content |
| --> $DIR/borrowck-fn-in-const-a.rs:19:16 |
| | |
| LL | return *x //[ast]~ ERROR cannot move out of borrowed content [E0507] |
| | ^^ cannot move out of borrowed content |
| |
| error[E0507]: cannot move out of `*x` which is behind a `&` reference |
| --> $DIR/borrowck-fn-in-const-a.rs:19:16 |
| | |
| LL | fn broken(x: &String) -> String { |
| | ------- help: consider changing this to be a mutable reference: `&mut std::string::String` |
| LL | return *x //[ast]~ ERROR cannot move out of borrowed content [E0507] |
| | ^^ |
| | | |
| | cannot move out of `*x` which is behind a `&` reference |
| | `x` is a `&` reference, so the data it refers to cannot be moved |
| |
| error: aborting due to 2 previous errors |
| |
| For more information about this error, try `rustc --explain E0507`. |