-
Notifications
You must be signed in to change notification settings - Fork 13.3k
confusing lifetime inference #33529
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
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lifetimes
Area: Lifetimes / regions
A-type-system
Area: Type system
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.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Comments
The problem is that @nikomatsakis: that sounds like a good test case for the new regionck error messages. |
Is there any good way to iterate all the cause of |
19 tasks
Update, minimal changes:
|
Output with nll enabled:
|
Triage: no change since nll. |
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
A-lifetimes
Area: Lifetimes / regions
A-type-system
Area: Type system
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.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Consider following snippet:
According to Book, cause's lifetime should be err's lifetime. which is 'a, so it should be safe to assign cause to err directly. But I got following warnnings:
Am I missing something here?
The text was updated successfully, but these errors were encountered: