Rollup merge of #35415 - silenuss:e0030-formatting, r=jonathandturner
Update compiler error 0030 to use new error format. Part of #35233, Addresses #35204 r? @jonathandturner
This commit is contained in:
commit
d3f55e1e86
@ -283,10 +283,10 @@ impl<'a, 'tcx, 'v> Visitor<'v> for CheckCrateVisitor<'a, 'tcx> {
|
||||
Ok(Ordering::Less) |
|
||||
Ok(Ordering::Equal) => {}
|
||||
Ok(Ordering::Greater) => {
|
||||
span_err!(self.tcx.sess,
|
||||
start.span,
|
||||
E0030,
|
||||
"lower range bound must be less than or equal to upper");
|
||||
struct_span_err!(self.tcx.sess, start.span, E0030,
|
||||
"lower range bound must be less than or equal to upper")
|
||||
.span_label(start.span, &format!("lower bound larger than upper bound"))
|
||||
.emit();
|
||||
}
|
||||
Err(ErrorReported) => {}
|
||||
}
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
fn main() {
|
||||
match 5u32 {
|
||||
1000 ... 5 => {} //~ ERROR E0030
|
||||
1000 ... 5 => {}
|
||||
//~^ ERROR lower range bound must be less than or equal to upper
|
||||
//~| NOTE lower bound larger than upper bound
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user