提交 97b9c8b8 编写于 作者: G Guillaume Gomez

Update error code number

上级 e7c3fb90
......@@ -1694,12 +1694,12 @@ fn main() {
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
}
......
......@@ -631,7 +631,7 @@ pub fn report_and_explain_type_error(&self,
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)
......
......@@ -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
......@@ -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]
......@@ -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]
......@@ -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]
' '
}
......@@ -14,5 +14,5 @@ struct S {
}
fn main(foo: S) {
//~^ ERROR: main function has wrong type [E0579]
//~^ ERROR: main function has wrong type [E0580]
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册