fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
499 B15 linesraw
1error[E0503]: cannot use `x` because it was mutably borrowed
2  --> $DIR/borrowck-non-exhaustive.rs:13:9
3   |
4LL |     let y = &mut x;
5   |             ------ borrow of `x` occurs here
6LL |     match x {
7LL |         NonExhaustiveMonovariant::Variant(_) => {},
8   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of borrowed `x`
9...
10LL |     drop(y);
11   |          - borrow later used here
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0503`.