Update E0301 to the new format
This commit is contained in:
parent
f55ac6944a
commit
302a423047
@ -1175,8 +1175,10 @@ fn borrow(&mut self,
|
||||
_: LoanCause) {
|
||||
match kind {
|
||||
MutBorrow => {
|
||||
span_err!(self.cx.tcx.sess, span, E0301,
|
||||
struct_span_err!(self.cx.tcx.sess, span, E0301,
|
||||
"cannot mutably borrow in a pattern guard")
|
||||
.span_label(span, &format!("borrowed mutably in pattern guard"))
|
||||
.emit();
|
||||
}
|
||||
ImmBorrow | UniqueImmBorrow => {}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ fn main() {
|
||||
match Some(()) {
|
||||
None => { },
|
||||
option if option.take().is_none() => {}, //~ ERROR E0301
|
||||
//~| NOTE borrowed mutably in pattern guard
|
||||
Some(_) => { }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user