]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-loan-of-static-data-issue-27616.stderr
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / ui / borrowck / borrowck-loan-of-static-data-issue-27616.stderr
1 error[E0506]: cannot assign to `*s` because it is borrowed
2   --> $DIR/borrowck-loan-of-static-data-issue-27616.rs:16:5
3    |
4 LL |     let alias: &'static mut String = s;
5    |                -------------------   - borrow of `*s` occurs here
6    |                |
7    |                type annotation requires that `*s` is borrowed for `'static`
8 ...
9 LL |     *s = String::new();
10    |     ^^ assignment to borrowed `*s` occurs here
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0506`.