rust/compiler/rustc_query_impl/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
..
keys.rs Use LocalDefId for closures more 2022-07-30 15:59:17 -05:00
lib.rs Simplify the syntax for macros generated by rustc_queries 2022-08-24 00:37:49 -05:00
on_disk_cache.rs rmeta/query cache: don't write string values of preinterned symbols 2022-08-20 15:39:21 +03:00
plumbing.rs Replace rustc_data_structures::thin_vec::ThinVec with thin_vec::ThinVec. 2022-08-29 15:42:13 +10:00
profiling_support.rs Simplify the syntax for macros generated by rustc_queries 2022-08-24 00:37:49 -05:00
README.md Move the query system to rustc_query_impl. 2021-02-19 17:51:58 +01:00
values.rs Do not report cycle error when inferring return type for suggestion 2022-08-16 03:00:32 +00:00

For more information about how the query system works, see the rustc dev guide.