Skip to content

Commit b52c362

Browse files
authored
Rollup merge of #98579 - RalfJung:alloc-tests, r=thomcc
liballoc tests: avoid int2ptr cast I think we don't need `ptr::from_exposed_addr` here; `ptr::invalid` should be enough for this test. (And this makes Miri less unhappy when running these tests.)
2 parents 9f66799 + 9b497ab commit b52c362

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/tests/fmt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ fn test_format_macro_interface() {
207207
{
208208
let val = usize::MAX;
209209
let exp = format!("{val:#x}");
210-
t!(format!("{:p}", val as *const isize), exp);
210+
t!(format!("{:p}", std::ptr::invalid::<isize>(val)), exp);
211211
}
212212

213213
// Escaping

0 commit comments

Comments
 (0)