Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update compiler error 0030 to use new error format. #35415

Merged
merged 1 commit into from
Aug 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/librustc_passes/consts.rs
Original file line number Diff line number Diff line change
@@ -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) => {}
}
4 changes: 3 additions & 1 deletion src/test/compile-fail/E0030.rs
Original file line number Diff line number Diff line change
@@ -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
}
}