mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
ddad1e1f15
layout_of: `T: Thin` implies `sizeof(&T) == sizeof(usize)` Use the `<T as Pointee>::Metadata` associated type to calculate the layout of a pointee's metadata, instead of hard-coding rules about certain types. Maybe this approach is overkill -- we could instead hard-code this approach as a fallback, with the matching on `Slice`/`Dynamic`/etc. happening first Fixes this issue here https://github.com/rust-lang/rust/pull/104338#issuecomment-1312595844 .. But is also useful with transmutes, for example, given the UI test I added below. |
||
---|---|---|
.. | ||
bootstrap | ||
ci | ||
doc | ||
etc | ||
librustdoc | ||
llvm-project@3dfd4d93fa | ||
rustdoc-json-types | ||
test | ||
tools | ||
README.md | ||
stage0.json | ||
version |
This directory contains the source code of the rust project, including:
- The test suite
- The bootstrapping build system
- Various submodules for tools, like cargo, etc.
For more information on how various parts of the compiler work, see the rustc dev guide.