Skip to content
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

E0090: Add explanation for error message #40723

Merged
merged 2 commits into from
Mar 23, 2017
Merged
Changes from 1 commit
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
13 changes: 12 additions & 1 deletion src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,18 @@ fn main() {
```
"##,

E0090: r##"
The wrong number of lifetimes were supplied. For example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you specify it is only when too few lifetimes are supplied that you get this error? When it is too many the error is E0088.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


```compile_fail,E0090
fn foo<'a: 'b, 'b: 'a>() {}

fn main() {
foo::<'static>(); // error, expected 2 lifetime parameters
}
```
"##,

E0091: r##"
You gave an unnecessary type parameter in a type alias. Erroneous code
example:
Expand Down Expand Up @@ -4120,7 +4132,6 @@ register_diagnostics! {
// E0068,
// E0085,
// E0086,
E0090,
E0103, // @GuillaumeGomez: I was unable to get this error, try your best!
E0104,
// E0123,
Expand Down