-
Couldn't load subscription status.
- Fork 13.9k
create a drop ladder for an array if any value is moved out #46334
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
|
working on subslice support |
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 size should be a u64?
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.
Could you add this test to src/test/run-pass/dynamic-drop.rs instead? That has a framework that tests leak-proofness in panics.
|
r=me using the |
0ca5f7d to
be8f80f
Compare
|
☔ The latest upstream changes (presumably #46425) made this pull request unmergeable. Please resolve the merge conflicts. |
be8f80f to
fb7db60
Compare
fb7db60 to
7be2fd8
Compare
|
|
||
| let tcx = self.tcx(); | ||
| if let Some(size) = opt_size { | ||
| assert!(size <= (u32::MAX as u64), |
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 tried compile
let b : [bool; 5_000_000_000] = [true; 5000000000];
let [x,..] = b;
but compiler fails on earlier stage with OOM
|
@bors r+ |
|
📌 Commit 7be2fd8 has been approved by |
|
I suppose we might land this first and then get subslice support working. |
|
☀️ Test successful - status-appveyor, status-travis |
r? @arielb1
first commit for fix #34708 (note: this still handles the subslice case in a very broken manner)