about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-01 10:48:54 +0100
committerGitHub <noreply@github.com>2022-01-01 10:48:54 +0100
commita6e4d684aa37c0c2e63cb5abf7b0fcf8b404d69c (patch)
tree6581e05472c5e6686fccb4a347beb5f94ee78696 /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff
parent5a5c9282e04711df07beb883eb463a136f91fbf9 (diff)
parent777c853b4a8274b293f30c029cc18bccedde9ecf (diff)
downloadrust-a6e4d684aa37c0c2e63cb5abf7b0fcf8b404d69c.tar.gz
rust-a6e4d684aa37c0c2e63cb5abf7b0fcf8b404d69c.zip
Rollup merge of #92097 - saethlin:split-without-deref, r=the8472
Implement split_at_spare_mut without Deref to a slice so that the spare slice is valid

~I'm not sure I understand what's going on here correctly. And I'm pretty sure this safety comment needs to be changed. I'm just referring to the same thing that `as_mut_ptr_range` does.~ (Thanks `@RalfJung` for the guidance and clearing things up)

I tried to run https://github.com/rust-lang/miri-test-libstd on alloc with -Zmiri-track-raw-pointers, and got a failure on the test `vec::test_extend_from_within`.

I minimized the test failure into this program:
```rust
#![feature(vec_split_at_spare)]
fn main() {
    Vec::<i32>::with_capacity(1).split_at_spare_mut();
}
```

The problem is that the existing implementation is actually getting a pointer range where both pointers are derived from the initialized region of the Vec's allocation, but we need the second one to be valid for the region between len and capacity. (thanks Ralf for clearing this up)
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions