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

E0090: Add explanation for error message #40723

merged 2 commits into from
Mar 23, 2017

Conversation

SamWhited
Copy link
Contributor

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
}
```

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

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

Take a look at the wording for E0088 to expand this a bit. For example, you could also show what the proper code would look like.

@@ -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.

@estebank
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 22, 2017

📌 Commit 8ea0f18 has been approved by estebank

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Mar 22, 2017
…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
    }
    ```
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 22, 2017
…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
    }
    ```
bors added a commit that referenced this pull request Mar 22, 2017
Rollup of 13 pull requests

- Successful merges: #40509, #40523, #40548, #40578, #40619, #40689, #40690, #40692, #40704, #40722, #40723, #40725, #40732
- Failed merges:
@bors bors merged commit 8ea0f18 into rust-lang:master Mar 23, 2017
@SamWhited SamWhited deleted the e0090_error_explanation branch March 23, 2017 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants