- Notifications
You must be signed in to change notification settings - Fork 14k
Make Box<dyn FnOnce> respect self alignment #71170
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
Conversation
f630df3 to da12757 Compare
nikomatsakis left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, needs a test!
da12757 to d8549c0 Compare
oh, test was left untracked on my computer. |
733373a to cb22781 Compare | This is still not working :/ |
| The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
a94808a to c8e6669 Compare | The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
4755471 to b285807 Compare b285807 to b3d4262 Compare | @nikomatsakis @eddyb this should be now ready for review. |
986b0e2 to 33ceb58 Compare There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this feature check? I guess that unsized locals, if passed, will get an error elsewhere in the compiler anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I suppose it doesn't hurt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @eddyb had talked about possibly adding a second feature gate here.. not sure if we want to consider that in this PR? Probably not, since I imagine it may require unrelated changes elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes seem ok 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So... this is a bit suboptimal, in that the move is really occurring because foo was invoked on *x -- i.e., the type str -- but the new IR makes the borrow checker see it otherwise. I'm not sure how easy/hard that would be to fix. Probably not worth worrying about, I think.
33ceb58 to 683a5fb Compare | The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
844a496 to 365807f Compare | @spastorino I pushed the edits to the comments that I made, as requested. I think they're a mild improvement. |
| @bors r+ |
| 📌 Commit 4e53a9a has been approved by |
| ☀️ Test successful - checks-azure |
Remove the `<Box<F> as FnOnce>::call_once` hack now that rust-lang/rust#71170 is merged.
| Did this also fix #61042? |
Closes #68304
r? @eddyb @nikomatsakis