Skip to content

Commit 97b9c8b

Browse files
Update error code number
1 parent e7c3fb9 commit 97b9c8b

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

src/librustc/diagnostics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1694,12 +1694,12 @@ To understand better how closures work in Rust, read:
16941694
https://doc.rust-lang.org/book/closures.html
16951695
"##,
16961696

1697-
E0579: r##"
1697+
E0580: r##"
16981698
The `main` function was incorrectly declared.
16991699
17001700
Erroneous code example:
17011701
1702-
```compile_fail,E0579
1702+
```compile_fail,E0580
17031703
fn main() -> i32 { // error: main function has wrong type
17041704
0
17051705
}

src/librustc/infer/error_reporting.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
631631
struct_span_err!(self.tcx.sess, span, E0317, "{}", failure_str)
632632
}
633633
ObligationCauseCode::MainFunctionType => {
634-
struct_span_err!(self.tcx.sess, span, E0579, "{}", failure_str)
634+
struct_span_err!(self.tcx.sess, span, E0580, "{}", failure_str)
635635
}
636636
_ => {
637637
struct_span_err!(self.tcx.sess, span, E0308, "{}", failure_str)

src/test/compile-fail/E0579.rs renamed to src/test/compile-fail/E0580.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
fn main() -> i32 { 0 } //~ ERROR E0579
11+
fn main() -> i32 { 0 } //~ ERROR E0580

src/test/compile-fail/bad-main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
fn main(x: isize) { } //~ ERROR: main function has wrong type [E0579]
11+
fn main(x: isize) { } //~ ERROR: main function has wrong type [E0580]

src/test/compile-fail/extern-main-fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
extern fn main() {} //~ ERROR: main function has wrong type [E0579]
11+
extern fn main() {} //~ ERROR: main function has wrong type [E0580]

src/test/compile-fail/main-wrong-type-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
// except according to those terms.
1010

1111
fn main() -> char {
12-
//~^ ERROR: main function has wrong type [E0579]
12+
//~^ ERROR: main function has wrong type [E0580]
1313
' '
1414
}

src/test/compile-fail/main-wrong-type.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ struct S {
1414
}
1515

1616
fn main(foo: S) {
17-
//~^ ERROR: main function has wrong type [E0579]
17+
//~^ ERROR: main function has wrong type [E0580]
1818
}

0 commit comments

Comments
 (0)