File tree 2 files changed +7
-4
lines changed
src/librustc_error_codes/error_codes
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.
2
2
3
3
Erroneous code example:
4
4
9
9
}
10
10
```
11
11
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:
13
13
14
14
```
15
15
struct 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
+
3
3
Erroneous code example:
4
4
5
5
``` compile_fail,E0131
6
6
fn main<T>() { // error: main function is not allowed to have generic parameters
7
7
}
8
8
```
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