Rollup merge of - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC

Clean up err codes

r? @Dylan-DPC
This commit is contained in:
Yuki Okushi 2020-01-03 17:56:32 +09:00 committed by GitHub
commit 39a68a130a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions
src/librustc_error_codes/error_codes

@ -1,4 +1,4 @@
You declared a pattern as an argument in a foreign function declaration.
A pattern was declared as an argument in a foreign function declaration.
Erroneous code example:
@ -9,7 +9,7 @@ extern {
}
```
Please replace the pattern argument with a regular one. Example:
To fix this error, replace the pattern argument with a regular one. Example:
```
struct SomeStruct {

@ -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.