Rollup merge of #40723 - SamWhited:e0090_error_explanation, r=estebank

E0090: Add explanation for error message

See #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
    }
    ```
This commit is contained in:
Corey Farwell 2017-03-22 19:30:33 -04:00 committed by GitHub
commit 3e4c910a67
1 changed files with 22 additions and 1 deletions

View File

@ -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:
@ -4120,7 +4142,6 @@ register_diagnostics! {
// E0068,
// E0085,
// E0086,
E0090,
E0103, // @GuillaumeGomez: I was unable to get this error, try your best!
E0104,
// E0123,