We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5170a3f commit 0d15845Copy full SHA for 0d15845
src/libcore/tests/ptr.rs
@@ -145,7 +145,6 @@ fn test_as_ref() {
145
}
146
147
#[test]
148
-#[cfg(not(miri))] // This test is UB according to Stacked Borrows
149
fn test_as_mut() {
150
unsafe {
151
let p: *mut isize = null_mut();
@@ -164,7 +163,7 @@ fn test_as_mut() {
164
163
// Pointers to unsized types -- slices
165
let s: &mut [u8] = &mut [1, 2, 3];
166
let ms: *mut [u8] = s;
167
- assert_eq!(ms.as_mut(), Some(s));
+ assert_eq!(ms.as_mut().unwrap() as *mut _, s as *mut _);
168
169
let mz: *mut [u8] = &mut [];
170
assert_eq!(mz.as_mut(), Some(&mut [][..]));
0 commit comments