| error[E0499]: cannot borrow `*x` as mutable more than once at a time |
| --> $DIR/nll-problem-case-3-issue-54663.rs:20:9 |
| | |
| LL | fn foo(x: &mut u8) -> Option<&u8> { |
| | - let's call the lifetime of this reference `'1` |
| LL | if let Some(y) = bar(x) { |
| | - first mutable borrow occurs here |
| LL | return Some(y); |
| | ------- returning this value requires that `*x` is borrowed for `'1` |
| LL | } |
| LL | bar(x) |
| | ^ second mutable borrow occurs here |
| |
| error: aborting due to 1 previous error |
| |
| For more information about this error, try `rustc --explain E0499`. |