E0165 Update error format #35270
- Fixes #35270 - Part of #35233 r? @jonathandturner
This commit is contained in:
parent
6355528ffd
commit
28c5edb9f6
2 changed files with 5 additions and 1 deletions
|
@ -324,7 +324,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, E0165, "irrefutable while-let pattern");
|
||||
struct_span_err!(cx.tcx.sess, span, E0165,
|
||||
"irrefutable while-let pattern")
|
||||
.span_label(span, &format!("irrefutable pattern"))
|
||||
.emit();
|
||||
},
|
||||
|
||||
hir::MatchSource::ForLoopDesugar => {
|
||||
|
|
|
@ -13,6 +13,7 @@ struct Irrefutable(i32);
|
|||
fn main() {
|
||||
let irr = Irrefutable(0);
|
||||
while let Irrefutable(x) = irr { //~ ERROR E0165
|
||||
//~| irrefutable pattern
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue