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

End temporary lifetimes being extended by let X: &_ hints #39066

Merged
merged 1 commit into from
Jan 26, 2017

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Jan 14, 2017

@arielb1 arielb1 added the S-waiting-on-crater Status: Waiting on a crater run to be completed. label Jan 14, 2017
@rust-highfive
Copy link
Collaborator

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@nikomatsakis
Copy link
Contributor

Started a crater run from 27b9e6d to edb3baaa6c0e14481e4a4fa771d57f67f21d5a14.

@brson
Copy link
Contributor

brson commented Jan 20, 2017

Crater doesn't seem to be done. I asked it to test the crates for those two commits.

@brson
Copy link
Contributor

brson commented Jan 20, 2017

Hm, actually I don't see a working toolchain, so I asked crater to build those too:

$ target/debug/crater-cli.exe custom-build https://github.com/arielb1/rust 27b9e6d450590751fca863312a8cf10f289cf1f2
created task for https://github.com/arielb1/rust
inspector link: https://tools.taskcluster.net/task-inspector/#ISvWJ_uHQ6-a7JqkzPao7g

$ target/debug/crater-cli.exe custom-build https://github.com/arielb1/rust edb3baaa6c0e14481e4a4fa771d57f67f21d5a14
created task for https://github.com/arielb1/rust
inspector link: https://tools.taskcluster.net/task-inspector/#7hHpwaOwTB2Oeni5xdSV3g

@nikomatsakis
Copy link
Contributor

@brson yeah I was getting null results for some reason, not sure what went wrong :(

@brson
Copy link
Contributor

brson commented Jan 20, 2017

Ok, there was a bug in crater. The message broker shutdown at some point and crater never recovered. After starting back up it received the toolchain build complete messages, and I've started the crate builds.

@brson
Copy link
Contributor

brson commented Jan 23, 2017

Crater says. Only 2 false positives.

@arielb1
Copy link
Contributor Author

arielb1 commented Jan 23, 2017

No positives yay! We should just merge this.

@nikomatsakis - since there is nothing on Crater, do you think we can go without a warning?

@nikomatsakis
Copy link
Contributor

@arielb1 Hmm, interesting! I'm not sure. Can we land it but also include some of this code, so that if you do get an error, we give a nice error message directing you to a tracking issue? How hard would that be?

@nikomatsakis
Copy link
Contributor

@arielb1 (after all we don't have 100% coverage, crater is still linux only I think, but also outside of crates.io)

@arielb1
Copy link
Contributor Author

arielb1 commented Jan 24, 2017

Added some warnings in a commit - the case that causes new lifetime errors is quite pathological (I added a test), but it exists.

@nikomatsakis
Copy link
Contributor

r? @nikomatsakis

@rust-highfive rust-highfive assigned nikomatsakis and unassigned eddyb Jan 24, 2017
expr_span,
"this expression will be dropped at a different time - see #38603");
"this expression used to live longer due to #36082");
Copy link
Contributor

Choose a reason for hiding this comment

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

we should make a proper tracking issue with an explanation of how to rewrite code to be unambiguous, but this seems good otherwise



fn main() {
let a: &_ = *&&0;
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this test ... testing?

@arielb1
Copy link
Contributor Author

arielb1 commented Jan 25, 2017

Ready for review.

r? @nikomatsakis

@arielb1 arielb1 changed the title crater check commit for issue #36082 End temporary lifetimes being extended by let X: &_ hints Jan 25, 2017
mc::Categorization::Rvalue(r, or) if r != or => {
db.note("\
before rustc 1.16, this temporary lived longer - see issue #39283 \
(https://github.com/rust-lang/rust/issues/39283)");
Copy link
Contributor

Choose a reason for hiding this comment

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

nice, thanks for writing that up

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jan 25, 2017

📌 Commit 82a2805 has been approved by nikomatsakis

@bors
Copy link
Contributor

bors commented Jan 26, 2017

⌛ Testing commit 82a2805 with merge a1030b2...

@bors
Copy link
Contributor

bors commented Jan 26, 2017

💔 Test failed - status-travis

@arielb1
Copy link
Contributor Author

arielb1 commented Jan 26, 2017

Strange error on the dist bot - cc @alexcrichton

@bors retry

@bors
Copy link
Contributor

bors commented Jan 26, 2017

⌛ Testing commit 82a2805 with merge 8430042...

bors added a commit that referenced this pull request Jan 26, 2017
End temporary lifetimes being extended by `let X: &_` hints

cc #39283

r? @nikomatsakis
@bors
Copy link
Contributor

bors commented Jan 26, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 8430042 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-crater Status: Waiting on a crater run to be completed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants