]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0301.stderr
normalize use of backticks/lowercase in compiler messages for librustc_mir
[rust.git] / src / test / ui / error-codes / E0301.stderr
1 error[E0301]: cannot mutably borrow in a pattern guard
2   --> $DIR/E0301.rs:4:19
3    |
4 LL |         option if option.take().is_none() => {},
5    |                   ^^^^^^ borrowed mutably in pattern guard
6    |
7    = help: add `#![feature(bind_by_move_pattern_guards)]` to the crate attributes to enable
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
16
17 error: aborting due to 2 previous errors
18
19 Some errors have detailed explanations: E0301, E0596.
20 For more information about an error, try `rustc --explain E0301`.