Skip to content

Commit

Permalink
Rollup merge of rust-lang#40723 - SamWhited:e0090_error_explanation, …
Browse files Browse the repository at this point in the history
…r=estebank

E0090: Add explanation for error message

See rust-lang#32777

    $ rustc --explain E0090
    The wrong number of lifetimes were supplied. For example:

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

    fn main() {
        foo::<'static>(); // error, expected 2 lifetime parameters
    }
    ```
  • Loading branch information
frewsxcv committed Mar 22, 2017
2 parents 6e7533f + 8ea0f18 commit 3e4c910
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,28 @@ fn main() {
```
"##,

E0090: r##"
You gave too few lifetime parameters. Example:
```compile_fail,E0090
fn foo<'a: 'b, 'b: 'a>() {}
fn main() {
foo::<'static>(); // error, expected 2 lifetime parameters
}
```
Please check you give the right number of lifetime parameters. Example:
```
fn foo<'a: 'b, 'b: 'a>() {}
fn main() {
foo::<'static, 'static>();
}
```
"##,

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

0 comments on commit 3e4c910

Please sign in to comment.