]>
Commit | Line | Data |
---|---|---|
2c00a5a8 | 1 | error[E0301]: cannot mutably borrow in a pattern guard |
0731742a | 2 | --> $DIR/E0301.rs:4:19 |
2c00a5a8 | 3 | | |
532ac7d7 | 4 | LL | option if option.take().is_none() => {}, |
2c00a5a8 | 5 | | ^^^^^^ borrowed mutably in pattern guard |
48663c56 | 6 | | |
416331ca | 7 | = help: add `#![feature(bind_by_move_pattern_guards)]` to the crate attributes to enable |
48663c56 XL |
8 | |
9 | error[E0596]: cannot borrow `option` as mutable, as it is immutable for the pattern guard | |
10 | --> $DIR/E0301.rs:4:19 | |
11 | | | |
12 | LL | option if option.take().is_none() => {}, | |
13 | | ^^^^^^ cannot borrow as mutable | |
14 | | | |
15 | = note: variables bound in patterns are immutable until the end of the pattern guard | |
2c00a5a8 | 16 | |
48663c56 | 17 | error: aborting due to 2 previous errors |
2c00a5a8 | 18 | |
48663c56 XL |
19 | Some errors have detailed explanations: E0301, E0596. |
20 | For more information about an error, try `rustc --explain E0301`. |