rust-lang / hashbrown

Rust port of Google's SwissTable hash map
https://rust-lang.github.io/hashbrown
Apache License 2.0
2.43k stars 288 forks source link

Update RawTable with fallible APIs #459

Closed udoprog closed 1 year ago

udoprog commented 1 year ago

This introduces additional raw functions which allows for the use of infallible eq and hasher implementations with a passed around context.

See #456 for a detailed motivation.

Note that eq could be impl Fn rather than impl FnMut after this.

I've also not bothered converting methods that I'm not using yet, such as get_many_unchecked_mut since I want to get an idea whether this change would be accepted or not.

Closes #456

udoprog commented 1 year ago

:thinking:

   = note: /usr/bin/ld: /rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-19964a87984cce8a.rlib(std-19964a87984cce8a.std.d3cd61b6198d5d17-cgu.0.rcgu.o): TLS transition from R_X86_64_TLSLD to R_X86_64_TPOFF32 against `_ZN3std9panicking11panic_count17LOCAL_PANIC_COUNT7__getit3VAL17h3ab482653e57521bE.0' at 0x5af in section `.text._ZN3std2rt19lang_start_internal17h8c00664471eb83c4E' failed
          /rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-19964a87984cce8a.rlib: error adding symbols: Bad value
          collect2: error: ld returned 1 exit status
JustForFun88 commented 1 year ago

Issue rust-lang/rust#115239

bors commented 1 year ago

:umbrella: The latest upstream changes (presumably #451) made this pull request unmergeable. Please resolve the merge conflicts.

udoprog commented 1 year ago

Closing based on feedback in #456