diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-08-17 12:34:33 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-08-22 07:35:33 +1000 |
| commit | 05a0dfe8cd4db51a08d11ab24cc1586c833e2df1 (patch) | |
| tree | b04ef71fbc5262172d6a67d8dea592c8d16f2eda /tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff | |
| parent | 6884e045bb8e03f6ee0a23454ac679aea1729c75 (diff) | |
| download | rust-05a0dfe8cd4db51a08d11ab24cc1586c833e2df1.tar.gz rust-05a0dfe8cd4db51a08d11ab24cc1586c833e2df1.zip | |
Use `AttrVec` in more places.
In some places we use `Vec<Attribute>` and some places we use `ThinVec<Attribute>` (a.k.a. `AttrVec`). This results in various points where we have to convert between `Vec` and `ThinVec`. This commit changes the places that use `Vec<Attribute>` to use `AttrVec`. A lot of this is mechanical and boring, but there are some interesting parts: - It adds a few new methods to `ThinVec`. - It implements `MapInPlace` for `ThinVec`, and introduces a macro to avoid the repetition of this trait for `Vec`, `SmallVec`, and `ThinVec`. Overall, it makes the code a little nicer, and has little effect on performance. But it is a precursor to removing `rustc_data_structures::thin_vec::ThinVec` and replacing it with `thin_vec::ThinVec`, which is implemented more efficiently.
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions
