Skip to content

Commit 8341a9a

Browse files
Clean up E0131 error explanation
1 parent d202b59 commit 8341a9a

File tree

1 file changed

+5
-2
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+5
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
It is not possible to define `main` with generic parameters.
2-
When `main` is present, it must take no arguments and return `()`.
1+
The `main` function was defined with generic parameters.
2+
33
Erroneous code example:
44

55
```compile_fail,E0131
66
fn main<T>() { // error: main function is not allowed to have generic parameters
77
}
88
```
9+
10+
It is not possible to define the `main` function with generic parameters.
11+
It must not take any arguments.

0 commit comments

Comments
 (0)