Configures the `stable_deref_trait` to only be included for `arm_llsc`
and `target_arch = "x86"` platforms. This is because the dependency is
only used for the `pool` module, and the `pool` module is only used on
the above platforms.
Reduces the dependency graph for all other platforms.
- `cfg(target_has_atomic)` is stable now, use that.
- Hardcode in `build.rs` the list of targets with load/store but no CAS,
since `cfg(target_has_atomic_load_store)` is not stable yet.
- Do not try to autodetect whether `portable-atomic` is needed or not,
just let the user control it directly. If the user doesn't explicitly
enable `portable-atomic` and native atomics are unavailable, the
features requiring it will be missing.
this release of `hash32` has the advantage that 32-bit hashers can be used to hash types that
implement the `core:#️⃣:Hash` trait removing the need for the `hash32::Hash` implementations in
this crate and the uses of the `#[derive(Hash32)]` macro (which did not support enums) in dependent
crates
with this change the following code works
``` rust
// NOTE no derive(Hash32)
struct Int(i32);
let mut x = FnvIndexSet::<_, 4>::default();
let _ = x.insert(Int(0));
```
this change is technically a breaking change because the following code is no longer accepted
``` rust
// assume this type comes from a dependency
// NOTE no derive(Hash)
struct Int(i32);
let mut x = FnvIndexSet::<_, 4>::default();
let _ = x.insert(Int(0)); // error: does not implement Hash
```
as it's easier to deal with TSAN false positives in the former API
as surfaced in PR 280 the current supression rules don't handle newer versions of the
scoped_threadpool crate
trying to update the supression rules related to scoped_threadpool in PR #282 revealed that the
supression rules are masking (hiding) real data races:
https://github.com/japaric/heapless/pull/282#issuecomment-1113173358
std:🧵:scope requires less supression rules and does not mask real data races -- for instance,
the data race in the linked issue comment is not masked when using std:🧵:scope
tradeoffs:
- pro: one less dev dependency
- pro: supressions file is simpler
- cons: std:🧵:scope is only available on recent nightlies