mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-29 22:04:07 +00:00
Fix unsoundness in some tests
This commit is contained in:
parent
8de4c7234d
commit
eb2913b01b
@ -66,7 +66,7 @@ fn clear() {
|
||||
|
||||
#[test]
|
||||
fn set_init() {
|
||||
let buf: &mut [_] = &mut [MaybeUninit::uninit(); 16];
|
||||
let buf: &mut [_] = &mut [MaybeUninit::zeroed(); 16];
|
||||
let mut rbuf: BorrowedBuf<'_> = buf.into();
|
||||
|
||||
unsafe {
|
||||
@ -134,7 +134,7 @@ fn reborrow_written() {
|
||||
|
||||
#[test]
|
||||
fn cursor_set_init() {
|
||||
let buf: &mut [_] = &mut [MaybeUninit::uninit(); 16];
|
||||
let buf: &mut [_] = &mut [MaybeUninit::zeroed(); 16];
|
||||
let mut rbuf: BorrowedBuf<'_> = buf.into();
|
||||
|
||||
unsafe {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user