- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Clean up and add tests for slice drop shims #59348
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
165e6e0    to
    94dfa06      
    Compare
  
    | I'm afraid I am not familiar with the drop shim code at all, I just did a few tiny changes to make Miri happy. I am not confident reviewing this. Sorry. Also, does the test pass the same way currently? Would be nice to use that test to see the effect of your changes. | 
94dfa06    to
    7ea00e0      
    Compare
  
    | Maybe @arielb1 could have a look. | 
| bors: try | 
| r? @oli-obk | 
7ea00e0    to
    c655481      
    Compare
  
    | ☔ The latest upstream changes (presumably #60195) made this pull request unmergeable. Please resolve the merge conflicts. | 
c655481    to
    6fff547      
    Compare
  
    | assert!(size <= (u32::MAX as u64), | ||
| "move out check doesn't implemented for array bigger then u32"); | ||
| let size = size as u32; | ||
| let size: u32 = size.try_into().unwrap_or_else(|_| { | 
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.
ok
| let succ = self.succ; // FIXME(#43234) | ||
| let loop_block = self.drop_loop( | ||
| succ, | ||
| self.succ, | 
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.
cool!
| Nice cleanup. @bors r+ | 
| 📌 Commit 6fff547 has been approved by  | 
…=arielb1 Clean up and add tests for slice drop shims Adds a test for the MIR generated by `real_drop_in_place::<[T]>`. Also slightly reduces the number of statements and locals used in the shim. r? @RalfJung
Rollup of 8 pull requests Successful merges: - #59348 (Clean up and add tests for slice drop shims) - #60188 (Identify when a stmt could have been parsed as an expr) - #60234 (std: Derive `Default` for `io::Cursor`) - #60618 (Comment ext::tt::transcribe) - #60648 (Skip codegen for one UI test with long file path) - #60671 (remove unneeded `extern crate`s from build tools) - #60675 (Remove the old await! macro) - #60676 (Fix async desugaring providing wrong input to procedural macros.) Failed merges: r? @ghost
Adds a test for the MIR generated by
real_drop_in_place::<[T]>. Also slightly reduces the number of statements and locals used in the shim.r? @RalfJung