2018-08-08 14:28:26 +02:00
|
|
|
error[E0506]: cannot assign to `*s` because it is borrowed
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/borrowck-loan-of-static-data-issue-27616.rs:16:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | let alias: &'static mut String = s;
|
|
|
|
| - borrow of `*s` occurs here
|
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | *s = String::new();
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ assignment to borrowed `*s` occurs here
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0506`.
|