is_null is a tricky one isn't it? If you just compare one field (the pointer) to null, then for a fat pointer there are many null values. Might surprise someone down the line, don't know if there is any worse impact than that.
bluss
5
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Is there a reason that std::ptr requires T: Sized? | 4 | 920 | January 12, 2023 | |
| Making custom fat pointer types to behave as &mut | 6 | 1027 | November 13, 2021 | |
| Zero initialize `AtomicPtr` and `AtomicUsize` | 8 | 1537 | January 12, 2023 | |
| Why casting *mut T to *mut dyn Trait requires T: Sized? | 2 | 148 | November 4, 2025 | |
|
Pointer metadata on stable
|
4 | 508 | February 27, 2024 |