error[E0301]: cannot mutably borrow in a pattern guard --> $DIR/E0301.rs:4:19 | LL | option if option.take().is_none() => {}, | ^^^^^^ borrowed mutably in pattern guard | = help: add `#![feature(bind_by_move_pattern_guards)]` to the crate attributes to enable error[E0596]: cannot borrow `option` as mutable, as it is immutable for the pattern guard --> $DIR/E0301.rs:4:19 | LL | option if option.take().is_none() => {}, | ^^^^^^ cannot borrow as mutable | = note: variables bound in patterns are immutable until the end of the pattern guard error: aborting due to 2 previous errors Some errors have detailed explanations: E0301, E0596. For more information about an error, try `rustc --explain E0301`.