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_mir: treat DropAndReplace as Drop + Assign in qualify_consts. #62275

Merged
merged 1 commit into from
Jul 11, 2019

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Jul 1, 2019

This slipped through the cracks and never got implemented (thankfully that just meant it was overly conservative and didn't allow assignments that don't actually drop the previous value).
Fixes #62273.

r? @oli-obk

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 1, 2019
@eddyb
Copy link
Member Author

eddyb commented Jul 5, 2019

r? @pnkfelix

Oh, also, cc @oli-obk this might need qualify_min_consts support as well.

@rust-highfive rust-highfive assigned pnkfelix and unassigned oli-obk Jul 5, 2019
@pnkfelix
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 10, 2019

📌 Commit f6e5ac6 has been approved by pnkfelix

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 10, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 10, 2019
rustc_mir: treat DropAndReplace as Drop + Assign in qualify_consts.

This slipped through the cracks and never got implemented (thankfully that just meant it was overly conservative and didn't allow assignments that don't *actually* drop the previous value).
Fixes rust-lang#62273.

r? @oli-obk
bors added a commit that referenced this pull request Jul 10, 2019
Rollup of 5 pull requests

Successful merges:

 - #62275 (rustc_mir: treat DropAndReplace as Drop + Assign in qualify_consts.)
 - #62465 (Sometimes generate storage statements for temporaries with type `!`)
 - #62481 (Use `fold` in `Iterator::last` default implementation)
 - #62493 (#62357: doc(ptr): add example for {read,write}_unaligned)
 - #62532 (Some more cleanups to syntax::print)

Failed merges:

r? @ghost
bors added a commit that referenced this pull request Jul 10, 2019
Rollup of 5 pull requests

Successful merges:

 - #62275 (rustc_mir: treat DropAndReplace as Drop + Assign in qualify_consts.)
 - #62465 (Sometimes generate storage statements for temporaries with type `!`)
 - #62481 (Use `fold` in `Iterator::last` default implementation)
 - #62493 (#62357: doc(ptr): add example for {read,write}_unaligned)
 - #62532 (Some more cleanups to syntax::print)

Failed merges:

r? @ghost
@bors bors merged commit f6e5ac6 into rust-lang:master Jul 11, 2019
@bors
Copy link
Contributor

bors commented Jul 11, 2019

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

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 11, 2019
@eddyb eddyb deleted the const-drop-replace branch July 11, 2019 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Initialization by assignment not allowed for "drop-ful" types in constants.
6 participants