Files
rust/compiler/rustc_data_structures/src
Nicholas Nethercote b38106b6d8 Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec.
`rustc_data_structures::thin_vec::ThinVec` looks like this:
```
pub struct ThinVec<T>(Option<Box<Vec<T>>>);
```
It's just a zero word if the vector is empty, but requires two
allocations if it is non-empty. So it's only usable in cases where the
vector is empty most of the time.

This commit removes it in favour of `thin_vec::ThinVec`, which is also
word-sized, but stores the length and capacity in the same allocation as
the elements. It's good in a wider variety of situation, e.g. in enum
variants where the vector is usually/always non-empty.

The commit also:
- Sorts some `Cargo.toml` dependency lists, to make additions easier.
- Sorts some `use` item lists, to make additions easier.
- Changes `clean_trait_ref_with_bindings` to take a
  `ThinVec<TypeBinding>` rather than a `&[TypeBinding]`, because this
  avoid some unnecessary allocations.
2022-08-29 15:42:13 +10:00
..
2020-08-30 18:45:07 +03:00
2022-03-04 16:57:34 +01:00
2022-05-31 22:08:14 -07:00
2021-12-12 12:35:01 +08:00
2020-08-30 18:45:07 +03:00
2021-10-10 15:38:19 +02:00
2022-05-02 17:40:30 -07:00
2020-08-30 18:45:07 +03:00
2022-06-22 15:24:54 +03:00
2022-03-04 16:57:34 +01:00
2022-03-04 16:57:34 +01:00
2021-10-21 23:08:57 +02:00
2021-11-07 16:59:05 +01:00
2022-08-16 03:46:45 +02:00
2022-05-02 17:40:30 -07:00
2020-09-08 22:37:18 -04:00
2021-10-10 15:38:19 +02:00
2021-03-27 22:16:33 -04:00