zachs18

Results 39 comments of zachs18

I have a draft PR #196 that adds user-custom bounds for Zeroable, but considering that ["Perfect Derive"](https://smallcultfollowing.com/babysteps//blog/2022/04/12/implied-bounds-and-perfect-derive/#what-is-perfect-derive) is also possible (emit a bound for each field's type exactly), it might...

See https://github.com/Lokathor/bytemuck/pull/196#issuecomment-1594105645 for why the PR is indeed safe (it doesn't compile if the given bounds do not guarantee that all fields are `Zeroable`, same as before with e.g. `#[derive(Zeroable)]...

This would be problematic for `Weak`, specifically `Weak`s created by `Weak::new(_in)`, which do not have a backing allocation. `fn Weak::allocator` (if/when it exists) could return `Option` instead of `&A`, with...

> > This would also require `into_raw_with_allocator`/`from_raw_in` to be changed on all four types. `into_raw_with_allocator` could just be removed, with `into_raw` being generalized. `from_raw_in` would have to change in the...

~~Library-level, the signature for `Downgrade` could be changed to have `type Weak: Upgrade;` instead of just `type Weak: Upgrade;`. (Are there are any cases where `Self::Weak::Strong` isn't `Self`?)~~ (see below)...

~~redacted~~ Edit march 2023: That link is now dead. This link appears to work https://www.jntrnr.com/building-a-simple-jit-in-rust/

Since a single, shared `static` header is used for empty `ThinVec`s, having the current `ThinVec::new` be a `const fn` is only possible once Rust's [`const_refs_to_static`](https://github.com/rust-lang/rust/issues/119618) feature becomes stable.

#850 may be relevant Here is a screenshot when trying to buy GridRoad (https://rajacorp.itch.io/gridroad) using PayPal. ~~The same link as above is there~~ (edit: actually the link is slightly different:...

Does [`bytemuck::allocation::(try_)cast_slice_box`](https://docs.rs/bytemuck/latest/bytemuck/allocation/fn.cast_slice_box.html) (requires the `extern_crate_alloc` cargo feature) do what you need for the first point?