未验证 提交 b52c362b 编写于 作者: M Matthias Krüger 提交者: GitHub

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.)
......@@ -207,7 +207,7 @@ fn test_format_macro_interface() {
{
let val = usize::MAX;
let exp = format!("{val:#x}");
t!(format!("{:p}", val as *const isize), exp);
t!(format!("{:p}", std::ptr::invalid::<isize>(val)), exp);
}
// Escaping
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册