4
all 6 comments
sorted by: hot top new old
[-] Solemarc@lemmy.world 21 points 2 years ago* (last edited 2 years ago)

FYI, this is from 2015 and was deprecated around rust v1.0 release. It's not a current issue.

[-] BatmanAoD@programming.dev -1 points 2 years ago

Well, it's still true that mem::forget is safe, and Rust will almost certainly never change that. As noted in the blog post, this makes certain patterns unsound.

[-] arendjr@programming.dev 10 points 2 years ago* (last edited 2 years ago)

Only if your definition of soundness includes that leaks can never occur, which is not how Rust generally defines soundness. I think most Rust users know that the language doesn’t prevent leaks at this point.

[-] BatmanAoD@programming.dev 1 points 2 years ago

Maybe, but the comment I was responding to is not at all clear about what is deprecated and what is no longer an issue. Note, too, that the other top-level comment on the post is from someone who didn't realize that destructors can be missed.

[-] 0x01@lemmy.ml 7 points 2 years ago

Aww man uncalled destructors were definitely not even on my radar

this post was submitted on 26 Mar 2024
4 points (56.7% liked)

Rust

8252 readers
39 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 3 years ago
MODERATORS