about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/sso/map.rs
AgeCommit message (Collapse)AuthorLines
2025-02-22Greatly simplify lifetime captures in edition 2024Michael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-3/+5
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-01-24rustc_data_structures: use either instead of itertoolsJosh Stone-1/+1
2023-07-23more clippy::style fixes:Matthias Krüger-5/+1
get_first single_char_add_str unnecessary_mut_passed manual_map manual_is_ascii_check
2023-04-16fix clippy::toplevel_ref_arg and ::manual_mapMatthias Krüger-5/+2
2023-04-11Use `SSO_ARRAY_SIZE` instead of `8` in `SsoHashMap` implMaybe Waffle-17/+17
2023-04-11Use `itertools::Either` instead of own `EitherIter` implMaybe Waffle-18/+18
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-1/+0
2021-12-05Stop enabling `in_band_lifetimes` in rustc_data_structuresScott McMurray-2/+2
There's a conversation in the tracking issue about possibly unaccepting `in_band_lifetimes`, but it's used heavily in the compiler, and thus there'd need to be a bunch of PRs like this if that were to happen. So here's one to see how much of an impact it has. (Oh, and I removed `nll` while I was here too, since it didn't seem needed. Let me know if I should put that back.)
2021-10-15Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, ↵Matthias Krüger-4/+12
r=petrochenkov" The PR had some unforseen perf regressions that are not as easy to find. Revert the PR for now. This reverts commit 6ae8912a3e7d2c4c775024f58a7ba4b1aedc4073, reversing changes made to 86d6d2b7389fe1b339402c1798edae8b695fc9ef.
2021-10-10Apply clippy suggestionsClemens Wasser-12/+4
2021-10-04Stabilize try_reserveKornel-1/+1
2021-04-21Use arrayvec 0.7, drop smallvec 0.6Jubilee Young-8/+5
With the arrival of min const generics, many alt-vec libraries have updated to use it in some way and arrayvec is no exception. Use the latest with minor refactoring. Also, rustc_workspace_hack is the only user of smallvec 0.6 in the entire tree, so drop it.
2020-12-19Rollup merge of #78083 - ChaiTRex:master, r=m-ou-seYuki Okushi-1/+1
Stabilize or_insert_with_key Stabilizes the `or_insert_with_key` feature from https://github.com/rust-lang/rust/issues/71024. This allows inserting key-derived values when a `HashMap`/`BTreeMap` entry is vacant. The difference between this and `.or_insert_with(|| ... )` is that this provides a reference to the key to the closure after it is moved with `.entry(key_being_moved)`, avoiding the need to copy or clone the key.
2020-10-30Fix even more clippy warningsJoshua Nelson-3/+3
2020-10-18Stabilize or_insert_with_keyChai T. Rex-1/+1
2020-10-02SsoHashSet/Map - genericiy over Q removedValerii Lashmanov-54/+54
Due to performance regression, see SsoHashMap comment.
2020-09-27SsoHashMap minor refactoring, SSO_ARRAY_SIZE introducedValerii Lashmanov-12/+29
2020-09-26SsoHashSet reimplemented as a wrapper on top of SsoHashMapValerii Lashmanov-2/+16
SsoHashSet::replace had to be removed because it requires missing API from SsoHashMap. It's not a widely used function, so I think it's ok to omit it for now. EitherIter moved into its own file. Also sprinkled code with #[inline] attributes where appropriate.
2020-09-26SsoHashSet/SsoHashMap API greatly expandedValerii Lashmanov-20/+488
Now both provide almost complete API of their non-SSO counterparts.
2020-09-26MiniSet/MiniMap moved and renamed into SsoHashSet/SsoHashMapValerii Lashmanov-0/+61
It is a more descriptive name and with upcoming changes there will be nothing "mini" about them.