File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1- You declared a pattern as an argument in a foreign function declaration.
1+ A pattern was declared as an argument in a foreign function declaration.
22
33Erroneous code example:
44
99}
1010```
1111
12- Please replace the pattern argument with a regular one. Example:
12+ To fix this error, replace the pattern argument with a regular one. Example:
1313
1414```
1515struct SomeStruct {
Original file line number Diff line number Diff line change 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+
33Erroneous code example:
44
55``` compile_fail,E0131
66fn 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.
You can’t perform that action at this time.
0 commit comments