Update error code number

This commit is contained in:
Guillaume Gomez 2017-01-26 11:17:17 +01:00
parent e7c3fb90ee
commit 97b9c8b8d3
7 changed files with 8 additions and 8 deletions

View File

@ -1694,12 +1694,12 @@ To understand better how closures work in Rust, read:
https://doc.rust-lang.org/book/closures.html
"##,
E0579: r##"
E0580: r##"
The `main` function was incorrectly declared.
Erroneous code example:
```compile_fail,E0579
```compile_fail,E0580
fn main() -> i32 { // error: main function has wrong type
0
}

View File

@ -631,7 +631,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
struct_span_err!(self.tcx.sess, span, E0317, "{}", failure_str)
}
ObligationCauseCode::MainFunctionType => {
struct_span_err!(self.tcx.sess, span, E0579, "{}", failure_str)
struct_span_err!(self.tcx.sess, span, E0580, "{}", failure_str)
}
_ => {
struct_span_err!(self.tcx.sess, span, E0308, "{}", failure_str)

View File

@ -8,4 +8,4 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() -> i32 { 0 } //~ ERROR E0579
fn main() -> i32 { 0 } //~ ERROR E0580

View File

@ -8,4 +8,4 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main(x: isize) { } //~ ERROR: main function has wrong type [E0579]
fn main(x: isize) { } //~ ERROR: main function has wrong type [E0580]

View File

@ -8,4 +8,4 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
extern fn main() {} //~ ERROR: main function has wrong type [E0579]
extern fn main() {} //~ ERROR: main function has wrong type [E0580]

View File

@ -9,6 +9,6 @@
// except according to those terms.
fn main() -> char {
//~^ ERROR: main function has wrong type [E0579]
//~^ ERROR: main function has wrong type [E0580]
' '
}

View File

@ -14,5 +14,5 @@ struct S {
}
fn main(foo: S) {
//~^ ERROR: main function has wrong type [E0579]
//~^ ERROR: main function has wrong type [E0580]
}