diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-06-27 22:35:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-27 22:35:13 +0200 |
| commit | b52c362b8b9ccfc48f69cb27557e78ded7bb3568 (patch) | |
| tree | c177d134bcd85a1b86bf54013d8db7ffd7b5a166 | |
| parent | 9f667994fdbc40285f670dd1ef8bcb4f6385dab7 (diff) | |
| parent | 9b497abb9a5c661310722a85fabdce2fb8c02099 (diff) | |
| download | rust-b52c362b8b9ccfc48f69cb27557e78ded7bb3568.tar.gz rust-b52c362b8b9ccfc48f69cb27557e78ded7bb3568.zip | |
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.)
| -rw-r--r-- | library/alloc/tests/fmt.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/tests/fmt.rs b/library/alloc/tests/fmt.rs index 67e12c612db..5ee6db43fda 100644 --- a/library/alloc/tests/fmt.rs +++ b/library/alloc/tests/fmt.rs @@ -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 |
