]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-fn-in-const-a.ast.nll.stderr
Update output for borrowck=migrate compare mode.
[rust.git] / src / test / ui / borrowck / borrowck-fn-in-const-a.ast.nll.stderr
1 error[E0507]: cannot move out of borrowed content
2   --> $DIR/borrowck-fn-in-const-a.rs:19:16
3    |
4 LL |         return *x //[ast]~ ERROR cannot move out of borrowed content [E0507]
5    |                ^^ cannot move out of borrowed content
6
7 error[E0507]: cannot move out of `*x` which is behind a `&` reference
8   --> $DIR/borrowck-fn-in-const-a.rs:19:16
9    |
10 LL |     fn broken(x: &String) -> String {
11    |                  ------- help: consider changing this to be a mutable reference: `&mut std::string::String`
12 LL |         return *x //[ast]~ ERROR cannot move out of borrowed content [E0507]
13    |                ^^
14    |                |
15    |                cannot move out of `*x` which is behind a `&` reference
16    |                `x` 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`.