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

rustc --explain E0487 is inconsistent and unclear #67040

Closed
ryanswilson59 opened this issue Dec 5, 2019 · 2 comments
Closed

rustc --explain E0487 is inconsistent and unclear #67040

ryanswilson59 opened this issue Dec 5, 2019 · 2 comments
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug.

Comments

@ryanswilson59
Copy link

In the text visible at https://doc.rust-lang.org/1.25.0/error-index.html#E0478
We first see

In this example, the 'SnowWhite lifetime is supposed to outlive the 'kiss lifetime

struct Prince<'kiss, 'SnowWhite: 'kiss> { // You say here that 'kiss must live
                                          // longer than 'SnowWhite.
    child: Box<Wedding<'kiss> + 'SnowWhite>, // And now it's all good!
}

The comment directly contradicts that 'SnowWhite should outlive 'kiss, thus making it unclear what the code actually does.

@jonas-schievink jonas-schievink added C-bug Category: This is a bug. A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools labels Dec 5, 2019
JohnTitor added a commit to JohnTitor/rust that referenced this issue Dec 10, 2019
corrected comment in E0478

I believe this fixes the issue that I opened,  rust-lang#67040, about E0478 being contradictory.
@JohnTitor
Copy link
Member

@ryanswilson59 This has been fixed by #67168?

@JohnTitor
Copy link
Member

Closing as resolved, feel free to re-open if it's still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants