News for hackers. Stuff that matters.
Re:Pointers Are Complicated II, or: We need better language ... by jswrenn on Monday December 14, 2020 @01:42PM (#25421372)
Yes, the pointer issues Ralf raises has implications about what operations Rust can make safe. An example Ralf posed to the safe transmute working group: a transmutation from a reference (i.e., a pointer with provenance) to one without (e.g., a "raw" pointer) or to a `usize` number cannot be safe. (Rust can safely provide these conversions via the `as` keyword, just not via the more general framework of transmutations).

More broadly: Rust is very sensitive to LLVM bugs that inadvertently generate UB. The longstanding issues with `noalias` optimizations is the prime example of this: https://stackoverflow.com/a/57259339/7501301

Re:Pointers Are Complicated II, or: We need better language ... by Dylan16807 on Monday December 14, 2020 @06:04PM (#25424598)
How could transmutation from a reference to a usize not be safe? Do you mean "and back"?