-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update hashbrown to 0.8.1 #70052
Update hashbrown to 0.8.1 #70052
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
@bors rollup=never |
This comment has been minimized.
This comment has been minimized.
Looking over the diff in the PR you linked, this adds two uses of specialization to hashbrown which I believe carry over into std. I believe we are currently trying to vet specialization before adding more copies by ccing lang folks.
I am unsure who the "experts" here are, but let's try @nikomatsakis and perhaps @Centril first? |
|
Aside: reliance on |
Could you give an example of how delayed parsing with a macro would work? Is it something like this? #[cfg(feature = "nightly")]
macro_rules! default_fn {
($($x:tt)*) => {
default $($x)*
}
}
#[cfg(not(feature = "nightly"))]
macro_rules! default_fn {
($($x:tt)*) => {
$($x)*
}
} |
@Amanieu Example due to @petrochenkov #65860 (comment). |
I started a PR at rust-lang/hashbrown#147, let me know if any other changes are needed. |
|
I tried compiling with
|
If I'm understanding the |
☔ The latest upstream changes (presumably #69470) made this pull request unmergeable. Please resolve the merge conflicts. |
@matthewjasper Could you perhaps help @Amanieu with the answer to the above question? |
I'm trying to remember under what conditions adding |
@Amanieu Could we drop the specializations meanwhile to land the other bits sooner? |
The specializations are really the only significant improvement that is relevant to libstd. There's not much point in upgrading otherwise. |
|
Future-proof specialization code As per @Centril's [comment](rust-lang/rust#70052 (comment))
Hmm, upon further review I do believe that the specialization on The other one uses
|
💔 Test failed - checks-actions |
☔ The latest upstream changes (presumably #73265) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r=Mark-Simulacrum |
📌 Commit e46bb17 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
The corresponding PRs in rustc: rust-lang/rust#76458 rust-lang/rust#70052
The corresponding PRs in rustc: rust-lang/rust#76458 rust-lang/rust#70052
6258: Update HashMap/HashSet pretty-printers to Rust 1.47 r=Undin a=ortem Fixes #6198 The corresponding PRs in rustc: rust-lang/rust#76458 rust-lang/rust#70052 Besides these changes from the upstreamed pretty-printers, I've added `GetTypedefedType` (LLDB) and `strip_typedefs` (GDB) calls to resolve key and value types completely. Without these calls, LLDB doesn't show the actual type and so CLion fails to show the content of key/value pairs. For example, with `GetTypedefedType`: ``` (lldb) frame variable hm[0] ((i32, alloc::string::String)) hm[0] = { ... } ``` and without: ``` (lldb) frame variable hm[0] (T) hm[0] = { ... } ``` **Before merge, test on**: - [x] Linux + Bundled GDB + Rust 1.46 - [x] Linux + Bundled LLDB + Rust 1.46 - [x] Linux + Bundled GDB + Rust 1.47 - [x] Linux + Bundled LLDB + Rust 1.47 - [x] macOS + Bundled LLDB + Rust 1.46 - [x] macOS + Bundled LLDB + Rust 1.47 - [ ] Windows + MinGW/Cygwin GDB + Rust 1.47 - [ ] Windows + MinGW/Cygwin GDB + Rust 1.46 **Does not work on Windows + MSVC LLDB** due to the lack of native Rust support patches **After merge** - [ ] Upstream to rustc Co-authored-by: ortem <[email protected]>
The corresponding PRs in rustc: rust-lang/rust#76458 rust-lang/rust#70052 (cherry picked from commit d56d9e3)
Use `clone_from` from `hashbrown::{HashMap,HashSet}`. This change updates the `std` hash collections to use `hashbrown`'s `clone_from`, which was itself added in rust-lang#70052. Deriving `Clone` does not add a `clone_from` impl and uses the trait default, which calls `clone`. Fixes rust-lang#28481
This update includes:
Clone
and implementsclone_from
.HashMap
by 8 bytes.Fixes #28481