mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 19:27:30 +03:00
8d50bccc5b
Update `__rust_[rd]ealloc` to take `NonNull<u8>` instead of `*mut u8` Passing null to it is [already UB per Miri](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=8dcd25a549c11de72adc94a668277779) anyway, and this is ABI-compatible as `NonNull` is `repr(transparent)`. Inspired by https://github.com/rust-lang/rust/pull/152702#discussion_r2829961575 ; Similar to rust-lang/rust#152605 which changed `align: usize` to `align: ptr::Alignment`.