mem::transmute() docs could use some additional detail #44281
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-hard
Call for participation: Hard difficulty. Experience needed to fix: A lot.
P-medium
Medium priority
Here's a few things I thought of while reading the docs:
type punning
is used without being defined. Ordinarily, I wouldn't complain about this because it's very easy to Google search but most of the search results on the first page say that type punning is undefined behavior (in C\C++). This doesn't appear to be true in Rust because the Undefined Behaviors Page only references LLVM's pointer aliasing rules which seem to indicate that TBAA doesn't apply.The text was updated successfully, but these errors were encountered: