Skip to content

Commit

Permalink
Rollup merge of rust-lang#67816 - GuillaumeGomez:clean-up-err-codes, …
Browse files Browse the repository at this point in the history
…r=Dylan-DPC

Clean up err codes

r? @Dylan-DPC
  • Loading branch information
JohnTitor authored Jan 3, 2020
2 parents b0649c0 + 8341a9a commit 39a68a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/librustc_error_codes/error_codes/E0130.md
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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 {
Expand Down
7 changes: 5 additions & 2 deletions src/librustc_error_codes/error_codes/E0131.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 39a68a1

Please sign in to comment.