Daniel Henry-Mantilla

Results 82 comments of Daniel Henry-Mantilla
trafficstars

`transmute` (or `transmute_copy()` or `ptr.cast().read()`) is a very precise operation which takes a value (and a size), and reinterprets that span of bytes. We could imagine having: ```rs //! Since...

A stack-`pin!`ning macro: https://github.com/rust-lang/rust/pull/93176

Hey, sorry for the incredibly late answer, I somehow never got GH notifications about this repo 🙇 - Is the issue still happening with newer toolchains? It looks like a...

Hmm reopening since this indeed should not happen. I _think_ the issue is that the order/location of the `where` clause evolved, and you are using the more recent one: could...

That's why I think `Option< NonNull>` should be used instead of `*mut T`. I'd rather have the type checker remind me of `null` / `None` handling (and in the example...

@cormacrelf yep, there has to be an out-of-memory check somewhere within an allocation, that's why my allocation code aborts on the none case. `NonNull::new` should be a no-op (simple cast)...

The code could indeed be further improved as @RalfJung suggested: replace `Option` by `NonNull` altogether (thanks to the abort on null from OOM-handling), and then, on drop, use the pointer,...

You could release a new semver-compatible release for all the to-be-yanked / unsound releases out there, with a `#![deprecated…]` annotation on it nudging users to upgrade, which, coupled with the...

Yep, `FnPtrN` is not `!Sync`, and yet one can get a `&FnPtrN` from a `&ClosureN`, which seems fishy / likely UB (unless some external synchronization primitive comes into play: I...

Regarding threading the auto-traits, feel free to look at https://docs.rs/stackbox/latest/src/stackbox/dyn_traits/any.rs.html#31-40 for a not-so-far example; Once that's done, the auto-trait issue will be fixed, and indeed if `code_ptr()` takes a `&mut`...