12
submitted 3 weeks ago* (last edited 3 weeks ago) by ISO@lemmy.zip to c/rust@programming.dev

I checked some of the issues out, and this looks legit. Although a good chuck relates to obscure platform abstractions.

you are viewing a single comment's thread
view the rest of the comments
[-] Quantenteilchen@discuss.tchncs.de 6 points 3 weeks ago* (last edited 3 weeks ago)

I am not an expert but I think the actual problem is in the slice::iter first getting an immutable reference to the underlying data with self.0.next() before mapping it into a UserRef<T> which is instant UB because a &T guarantees exclusivity while UserRef<T> explicitly states in its contract that it does not guarantee anything like that, even if mutably borrowed.

So in essence the problem, as I understood it, is in the step from slice -> reference to value -> User ref of value with the italic part being illegal.

[-] INeedMana@piefed.zip 1 points 3 weeks ago

I think you put it more understandable

this post was submitted on 28 Apr 2026
12 points (83.3% liked)

Rust

8028 readers
1 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS