kennytm

Results 392 comments of kennytm

@coolCucumber-cat yes have you researched for existing proposals before? this is most likely a duplicate of #949 and #2242

Note that the RFC itself can already been done with the [`num_enum`](https://docs.rs/num_enum/0.7.2/num_enum/) package ([and tons of other alternatives](https://github.com/rust-lang/rfcs/issues/2783#issuecomment-679147876)). ```rust --- [dependencies] num_enum = "0.7.2" --- use num_enum::{TryFromPrimitive, IntoPrimitive, TryFromPrimitiveError}; #[derive(TryFromPrimitive,...

The segfault is a known issue, it is due to some offsetting of addresses in the __DATA segments (maybe related to ASLR). Not all address ranges are offset - some...

@steventroughtonsmith: Interesting... unfortunately I don't have an iOS 4+ device to check.

`MaybeUninit::freeze()` returns a `MaybeUninit` not a `T`, why would that be unsound

why not make `std::slice::from_raw_parts` (***not*** `std::ptr::from_raw_parts`) automatically check `data == null() && len == 0` and return `(dangling(), 0)` then and should this ACP affect `std::ptr::slice_from_raw_parts`? (create a `std::ptr::slice_from_raw_parts_or_empty` function)

but currently `std::slice::from_raw_parts(null(), 0)` (***not*** `std::ptr::from_raw_parts`) is undefined behavior according to the doc (`&[T]` must be non-null), so it not round-tripping with `.as_mut_ptr()` for the null case is certainly allowed...

It seems the primary reason of this RFC is that `.enum#discriminant` is `pub(in self)` so that, as mentioned in rust-lang/rust#106418, it allows author of the enum to reorder any variants...

@scottmcm > Well, changing *types* is still a major breaking change, right? I'm pretty sure changing `#[repr]` is a *breaking* change, with or without `discriminant_value`. At the very least it...

> Well, it's written in other places, like https://doc.rust-lang.org/std/mem/fn.size_of.html's Thanks. I hope there is a centralized place to look these up :smile: (maybe obi1kenobi/cargo-semver-checks#5?) > But -- less authoritatively --...