Skip to content

Commit 5ccf3ff

Browse files
committed
diagnostics: Remove main return type errors from E0580
1 parent be29e52 commit 5ccf3ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc/diagnostics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,12 +1764,12 @@ The `main` function was incorrectly declared.
17641764
Erroneous code example:
17651765
17661766
```compile_fail,E0580
1767-
fn main() -> i32 { // error: main function has wrong type
1768-
0
1767+
fn main(x: i32) { // error: main function has wrong type
1768+
println!("{}", x);
17691769
}
17701770
```
17711771
1772-
The `main` function prototype should never take arguments or return type.
1772+
The `main` function prototype should never take arguments.
17731773
Example:
17741774
17751775
```

0 commit comments

Comments
 (0)