Clean up E0131 error explanation
This commit is contained in:
parent
d202b59506
commit
8341a9a8f7
1 changed files with 5 additions and 2 deletions
|
|
@ -1,8 +1,11 @@
|
|||
It is not possible to define `main` with generic parameters.
|
||||
When `main` is present, it must take no arguments and return `()`.
|
||||
The `main` function was defined with generic parameters.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0131
|
||||
fn main<T>() { // error: main function is not allowed to have generic parameters
|
||||
}
|
||||
```
|
||||
|
||||
It is not possible to define the `main` function with generic parameters.
|
||||
It must not take any arguments.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue