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

Improve "Doesn't live long enough" error #37405

Merged
merged 1 commit into from
Nov 3, 2016
Merged

Conversation

mikhail-m1
Copy link
Contributor

case with different lifetime scope

issue #36537 part of #35233
r? @jonathandturner

18 | }
| ^ `x` dropped here while still borrowed
|
note: borrowed value must be valid for the lifetime 'a as defined on the block at 16:30...
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally we want to move away from this kind of message and move towards showing them where that lifetime ends rather than them having to look up what 16:30 means and trying to figure it out.

Can we do this patch without touching these errors, or are they part of what needs to be updated for this PR?

@frewsxcv
Copy link
Member

tidy check stage0 (x86_64-unknown-linux-gnu)
/build/src/librustc_borrowck/borrowck/mod.rs:1091: line longer than 100 chars
/build/src/librustc_borrowck/borrowck/mod.rs:1093: line longer than 100 chars

@mikhail-m1
Copy link
Contributor Author

@jonathandturner Is it ok?

@sophiajt
Copy link
Contributor

That looks good.

@bors r+

@bors
Copy link
Contributor

bors commented Oct 31, 2016

📌 Commit b481a2d has been approved by jonathandturner

@bors
Copy link
Contributor

bors commented Nov 1, 2016

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

case with different lifetime with spans
@mikhail-m1
Copy link
Contributor Author

@jonathandturner rebased

@sophiajt
Copy link
Contributor

sophiajt commented Nov 2, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Nov 2, 2016

📌 Commit a0e7e35 has been approved by jonathandturner

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Nov 2, 2016
Improve "Doesn't live long enough" error

case with different lifetime scope

issue rust-lang#36537 part of rust-lang#35233
r? @jonathandturner
bors added a commit that referenced this pull request Nov 2, 2016
Rollup of 10 pull requests

- Successful merges: #37351, #37405, #37473, #37482, #37488, #37498, #37502, #37513, #37517, #37523
- Failed merges: #37521
@bors bors merged commit a0e7e35 into rust-lang:master Nov 3, 2016
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.

4 participants