mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 12:39:31 +03:00
Update error code number
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user