Skip to content

Clean up err codes #67816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.