Commit Graph

4 Commits

Author SHA1 Message Date
Martin Nordholts 697737a8b1 core: Make Debug impl of raw pointers print metadata if present
Make Rust pointers less magic by including metadata information in their
`Debug` output.

This does not break Rust stability guarantees because `Debug` output is
explicitly exempted from stability:
https://doc.rust-lang.org/std/fmt/trait.Debug.html#stability

Co-authored-by: Lukas <26522220+lukas-code@users.noreply.github.com>
Co-authored-by: Josh Stone <cuviper@gmail.com>
2025-02-15 17:27:55 +01:00
Martin Nordholts 9479b6f0ea tests: Add regression test for Debug impl of raw pointers 2025-02-15 17:22:45 +01:00
Martin Nordholts 7176320821 tests: Use as *const _ instead of .as_ptr() in ptr fmt test
Because `.as_ptr()` changes the type of the pointer (e.g. `&[u8]`
becomes `*const u8` instead of `*const [u8]`), and it can't be expected
that different types will be formatted the same way.
2025-02-15 17:02:54 +01:00
bjorn3 b6a3841942 Put all coretests in a separate crate 2025-01-26 10:26:36 +00:00