Update E0162 to the new format
This commit is contained in:
parent
b42a384a80
commit
daf7c60d16
@ -316,7 +316,10 @@ fn check_arms(cx: &MatchCheckCtxt,
|
||||
let &(ref first_arm_pats, _) = &arms[0];
|
||||
let first_pat = &first_arm_pats[0];
|
||||
let span = first_pat.span;
|
||||
span_err!(cx.tcx.sess, span, E0162, "irrefutable if-let pattern");
|
||||
struct_span_err!(cx.tcx.sess, span, E0162,
|
||||
"irrefutable if-let pattern")
|
||||
.span_label(span, &format!("irrefutable pattern"))
|
||||
.emit();
|
||||
printed_if_let_err = true;
|
||||
}
|
||||
},
|
||||
|
@ -13,6 +13,7 @@
|
||||
fn main() {
|
||||
let irr = Irrefutable(0);
|
||||
if let Irrefutable(x) = irr { //~ ERROR E0162
|
||||
//~| NOTE irrefutable pattern
|
||||
println!("{}", x);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user