summaryrefslogtreecommitdiffstats
path: root/tests/ui/higher-rank-trait-bounds/hrtb-identity-fn-borrows.stderr
blob: 25af011e3fc410049cc0a39322f06044556a0431 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
error[E0506]: cannot assign to `x` because it is borrowed
  --> $DIR/hrtb-identity-fn-borrows.rs:14:5
   |
LL |     let y = f.call(&x);
   |                    -- `x` is borrowed here
LL |     x = 5;
   |     ^^^^^ `x` is assigned to here but it was already borrowed
...
LL |     drop(y);
   |          - borrow later used here

error: aborting due to previous error

For more information about this error, try `rustc --explain E0506`.