]> git.proxmox.com Git - rustc.git/blame - src/test/ui/error-codes/E0301.stderr
New upstream version 1.38.0+dfsg1
[rustc.git] / src / test / ui / error-codes / E0301.stderr
CommitLineData
2c00a5a8 1error[E0301]: cannot mutably borrow in a pattern guard
0731742a 2 --> $DIR/E0301.rs:4:19
2c00a5a8 3 |
532ac7d7 4LL | 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
9error[E0596]: cannot borrow `option` as mutable, as it is immutable for the pattern guard
10 --> $DIR/E0301.rs:4:19
11 |
12LL | 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 17error: aborting due to 2 previous errors
2c00a5a8 18
48663c56
XL
19Some errors have detailed explanations: E0301, E0596.
20For more information about an error, try `rustc --explain E0301`.