Insider meta comment: making hidden links like that more obvious (and a bigger click target) is considered a major positive of the link click counting system.
It just occured to me now that another (more “reasonable”) way of emergency-debugging like that would be to abuse trait object vtables. If used with non-Debug types, it replaces the compiler crashes with run-time UB&crashes.
(Please keep this in any production code, either, for any longer than a short debugging session; vtable layout is unstable anyway, and even the cases where this works are possibly still technically-UB already. With layout changes this can stop working in the future at any time; and UB at run-time cannot be detected or prevented by any additional checks. At least there are no compiler crashes to be expected here.)
I don't like that project. Through the ways of the internet is somehow got some spotlight, but AFAIK it doesn’t really contain any novelty, but builds on the oldest type-system unsoundness in the books, which is a known issue for almost a decade longer than cve-rs exists
I mean, I guess if you aren’t up for the thought exercise yourself, reading through cve-rs can help with figuring out why circumventing the borrow checker lets you do essentially anything (e.g. arbitrary transmutations, etc…)
Rust2024 will be released soon, should it get stricter to prevent some "safe" bugs? E.g, it currently allows to get a pointer without unsafe, only dereferencing a pointer needs unsafe.
Producing raw pointers without unsafe is deliberately allowed anyway and not known to be problematic (w.r.t. overall language soundness) in any way.
Getting “stricter” in this sense, is not what editions are for, or something that editions can be helpful with. They explicitly support full interoperability, indefinitely, so requiring unsafe for something in a later edition doesn't actually prevent all that much.
Issues like these (this thread OP, or the GH issue linked above) with actual soundness problems aren't unfixed because of stability concerns anyway, but because they are hard to solve; and when they are solved, they will be fixed in all editions, because Rust’s goals of safety means it allows for itself to apply technically-breaking language changes if they are necessary to fix soundness issues. (And of course whilst also aiming to make such changes as minimal-impact as possible.)
Finally, scope of the 2024 edition is fixed for a few months already. (We don't even have 2024 anymore ) There is no chance of including any new features in it now. By now, the implementation is also completely done AFAIK… it will be part of beta tomorrow, actually.
There's even another crate[1] that existed 5 years prior, so I always considered that one an "interesting iff you're susceptible to hype" phenomenon. Did manage to get the issue locked though...
This badge is granted when your topic gets 50 likes. You kicked off a fascinating conversation and the community loved the lively discussion that resulted!
Oh the… “lively discussion that resulted”? Well, ya can’t have everything