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

Added detailed error code explanation for issue E0688 in Rust compiler. #72654

Closed
wants to merge 1 commit into from
Closed

Added detailed error code explanation for issue E0688 in Rust compiler. #72654

wants to merge 1 commit into from

Conversation

Polkaverse
Copy link
Contributor

Added proper error explanation for issue E0688 in the Rust compiler.
Error Code E0688

Sub Part of Issue #61137

r? @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

Some changes occurred in diagnostic error codes

cc @GuillaumeGomez

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 27, 2020
@Elinvynia Elinvynia added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 3, 2020
@Polkaverse
Copy link
Contributor Author

r? @davidtwco

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

Apologies for how long it's taken for this to be reviewed!

@@ -0,0 +1,36 @@
In-band lifetimes has mixed with explicit lifetime binders.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
In-band lifetimes has mixed with explicit lifetime binders.
In-band lifetimes were mixed with explicit lifetime binders.

}
```

We cannot mix in-band lifetimes with explicit lifetime binders.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
We cannot mix in-band lifetimes with explicit lifetime binders.
In-band lifetimes cannot be mixed with explicit lifetime binders.

This is really just a re-phrasing of the error, it'd be great to elaborate a little - something like "a function/struct/whatever can either have explicit lifetime binders or in-band lifetimes".

For example:

```
fn foo<'a, 'b>(x: &'a u32, y: &'b u32) {} // ok!
Copy link
Member

Choose a reason for hiding this comment

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

I'd also add another example where only in-band lifetimes are used (with a short sentence before each example explaining how they differ).

@bors
Copy link
Contributor

bors commented Jul 1, 2020

☔ The latest upstream changes (presumably #73924) made this pull request unmergeable. Please resolve the merge conflicts.

@Polkaverse Polkaverse closed this Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants