-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
“type must outlive the static lifetime” makes no sense #41816
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
I'll fix the simple version. PS: and try to do the big part later on. |
In addition to everything, the span is pretty bad. The type which must satisfy any of the lifetimes here is the implementor, not the trait. |
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
May 10, 2017
Improve E0477 error message Part of rust-lang#41816. r? @nagisa
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
May 10, 2017
Improve E0477 error message Part of rust-lang#41816. r? @nagisa
Mark-Simulacrum
added
the
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
label
Jul 26, 2017
Triage; this now says
So, not fixed yet! |
crlf0710
added
the
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
Jun 11, 2020
Still makes not much sense in 2022. |
Still makes not much sense in 2023 |
hnyls2002
added a commit
to hnyls2002/TRustAss
that referenced
this issue
Jul 19, 2023
- rust-lang/rust#41816 - https://stackoverflow.com/questions/59880262/rust-lifetime-parameter-must-outlive-the-static-lifetime This issue is still open, so I changed to Arc to store the meta data for a replica
Still makes not much sense in 2024 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
For the following code
The diagnostic looks like this:
The note here makes no sense, because the static lifetime is the longest lifetime of all and cannot really be outlived. We should reword the note so it doesn’t say “outlive”.
Bonus points for explaining where the lifetime requirement comes from, because it is not entirely clear what here introduces the requirement, when the trait and implementation definitions aren’t so close together.
The text was updated successfully, but these errors were encountered: