summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/sso
AgeCommit message (Collapse)AuthorLines
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-89/+72
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-228/+158
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-23/+864
Now both provide almost complete API of their non-SSO counterparts.
2020-09-26MiniSet/MiniMap moved and renamed into SsoHashSet/SsoHashMapValerii Lashmanov-0/+107
It is a more descriptive name and with upcoming changes there will be nothing "mini" about them.