rust/src/librustdoc/clean
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
..
cfg Fix cfg(not) and cfg(all) causing Rustdoc stab to disappear 2022-06-16 01:11:26 +08:00
types rustdoc: Unindent doc fragments on Attributes construction 2022-04-21 16:13:02 +03:00
utils Valid underscores in hex/octal/binary literal docs 2021-05-03 20:11:09 -04:00
auto_trait.rs Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
blanket_impl.rs Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
cfg.rs Fix cfg(not) and cfg(all) causing Rustdoc stab to disappear 2022-06-16 01:11:26 +08:00
inline.rs Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
mod.rs Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
render_macro_matchers.rs Remove TreeAndSpacing. 2022-07-29 15:52:15 +10:00
simplify.rs Remove crate visibility modifier in libs, tests 2022-05-21 00:32:47 -04:00
types.rs Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
utils.rs Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00