diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-05-07 08:05:02 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-05-09 08:13:24 +1000 |
| commit | f5d7d346a48b75ef566674fca05cd4b29a985678 (patch) | |
| tree | 9cd66faef76065045a88c68a8a58ce0dffd5836d /compiler/rustc_data_structures/src/lib.rs | |
| parent | d7814e72ebe3b4a293a5f91fa1648d2ef72639d3 (diff) | |
| download | rust-f5d7d346a48b75ef566674fca05cd4b29a985678.tar.gz rust-f5d7d346a48b75ef566674fca05cd4b29a985678.zip | |
Remove `TinyList`.
It is optimized for lists with a single element, avoiding the need for an allocation in that case. But `SmallVec<[T; 1]>` also avoids the allocation, and is better in general: more standard, log2 number of allocations if the list exceeds one item, and a much more capable API. This commit removes `TinyList` and converts the two uses to `SmallVec<[T; 1]>`. It also reorders the `use` items in the relevant file so they are in just two sections (`pub` and non-`pub`), ordered alphabetically, instead of many sections. (This is a relevant part of the change because I had to decide where to add a `use` item for `SmallVec`.)
Diffstat (limited to 'compiler/rustc_data_structures/src/lib.rs')
| -rw-r--r-- | compiler/rustc_data_structures/src/lib.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index b455cbeded9..2e5f3806b12 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -82,7 +82,6 @@ pub mod svh; pub mod sync; pub mod tagged_ptr; pub mod temp_dir; -pub mod tiny_list; pub mod transitive_relation; pub mod unhash; pub mod unord; |
