Auto merge of #38819 - GuillaumeGomez:main_func_wrong_type, r=GuillaumeGomez
Add a distinct error code and description for "main function has wron… …g type"
This commit is contained in:
commit
07fe04c1e2
7 changed files with 34 additions and 7 deletions
|
|
@ -8,4 +8,4 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
fn main() -> i32 { 0 } //~ ERROR E0308
|
||||
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
|
||||
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
|
||||
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
|
||||
//~^ ERROR: main function has wrong type [E0580]
|
||||
' '
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@ struct S {
|
|||
}
|
||||
|
||||
fn main(foo: S) {
|
||||
//~^ ERROR: main function has wrong type
|
||||
//~^ ERROR: main function has wrong type [E0580]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue