You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like there might be a problem in nightly Rust, where RandomState is available under a different module / import path than on stable Rust.
On Rust stable, RandomState is only available at std::collections::hash_map::RandomState, but on Rust nightly, it's also available at std::hash::RandomState (which is what is now used by serde_json's tests), but this looks like a mistake.
Not sure why your CI didn't catch that serde_json tests currently don't compile on stable Rust (i.e. this fails: cargo +stable test):
error[E0433]: failed to resolve: could not find `RandomState` in `hash`
--> tests/test.rs:2494:27
|
2494 | let rand = std::hash::RandomState::new();
| ^^^^^^^^^^^ could not find `RandomState` in `hash`
|
help: consider importing this struct
|
23 + use std::collections::hash_map::RandomState;
|
help: if you import `RandomState`, refer to it directly
|
2494 - let rand = std::hash::RandomState::new();
2494 + let rand = RandomState::new();
|
warning: unused import: `std::hash::BuildHasher`
--> tests/test.rs:37:5
|
37 | use std::hash::BuildHasher;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
The text was updated successfully, but these errors were encountered:
It looks like there might be a problem in nightly Rust, where
RandomState
is available under a different module / import path than on stable Rust.On Rust stable,
RandomState
is only available atstd::collections::hash_map::RandomState
, but on Rust nightly, it's also available atstd::hash::RandomState
(which is what is now used by serde_json's tests), but this looks like a mistake.Not sure why your CI didn't catch that serde_json tests currently don't compile on stable Rust (i.e. this fails:
cargo +stable test
):The text was updated successfully, but these errors were encountered: