]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/issue-48803.stderr
Auto merge of #101138 - Rejyr:diagnostic-migration-rustc-lint-pt2, r=davidtwco
[rust.git] / tests / ui / nll / issue-48803.stderr
1 error[E0506]: cannot assign to `x` because it is borrowed
2   --> $DIR/issue-48803.rs:10: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 |
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`.