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
}
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)
+++ /dev/null
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() -> i32 { 0 } //~ ERROR E0579
--- /dev/null
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() -> i32 { 0 } //~ ERROR E0580
// 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]
// 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]
// except according to those terms.
fn main() -> char {
-//~^ ERROR: main function has wrong type [E0579]
+//~^ ERROR: main function has wrong type [E0580]
' '
}
}
fn main(foo: S) {
-//~^ ERROR: main function has wrong type [E0579]
+//~^ ERROR: main function has wrong type [E0580]
}