]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-48803.stderr
Auto merge of #52994 - varkor:trim_direction, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-48803.stderr
1 error[E0506]: cannot assign to `x` because it is borrowed
2   --> $DIR/issue-48803.rs:22:5
3    |
4 LL |     let y = &x;
5    |             -- borrow of `x` occurs here
6 ...
7 LL |     x = "modified";
8    |     ^^^^^^^^^^^^^^ assignment to borrowed `x` occurs here
9 LL |     //~^ ERROR cannot assign to `x` because it is borrowed [E0506]
10 LL |     println!("{}", w); // prints "modified"
11    |                    - borrow later used here
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0506`.