The 8472
be8e67d93c
refactor: extract function
2023-04-27 22:29:03 +02:00
Ben Kimock
0445fbdd83
Store hashes in special types so they aren't accidentally encoded as numbers
2023-04-18 10:52:47 -04:00
Scott McMurray
c98895d9f2
Various minor Idx-related tweaks
...
Nothing particularly exciting here, but a couple of things I noticed as I was looking for more index conversions to simplify.
2023-04-16 02:42:50 -07:00
Scott McMurray
21bb8ef24e
Use FieldIdx in FieldsShape
...
Finally got to the main motivating example from the MCP :)
2023-04-04 12:38:06 -07:00
Scott McMurray
a2ee7592d6
Use &IndexSlice instead of &IndexVec where possible
...
All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*.
2023-04-02 17:35:37 -07:00
Scott McMurray
0439d13176
Refactor: VariantIdx::from_u32(0) -> FIRST_VARIANT
...
Since structs are always `VariantIdx(0)`, there's a bunch of files where the only reason they had `VariantIdx` or `vec::Idx` imported at all was to get the first variant.
So this uses a constant for that, and adds some doc-comments to `VariantIdx` while I'm there, since it doesn't have any today.
2023-03-25 18:58:25 -07:00
Michael Benfield
8df27d07ae
Remove some superfluous type parameters from layout.rs.
...
Specifically remove V, which can always be VariantIdx, and F, which can
always be Layout.
2023-01-21 10:22:31 -08:00
Maybe Waffle
f2b97a8bfe
Remove useless borrows and derefs
2022-12-01 17:34:43 +00:00
Oli Scherer
d7f5d784d7
Simplify and document range layout computation
2022-11-25 08:39:11 +00:00
hkalbasi
390a637e29
move things from rustc_target::abi to rustc_abi
2022-11-24 16:26:13 +03:30