I can not use HashMap in scale_info packages, but when I search in Substrate docs https://paritytech.github.io/substrate/latest/scale_info/prelude/collections/struct.HashMap.html. we can use HashMap

My current scale_info package:

scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }

When i cargo build --release -> no HashMap in collections

Is it eliminated?

1 Answer 1


Unfortunately at this time, the latest tag on the rustdocs is not pointing to a recent version of substrate source upstream. Please use master:


And if in doubt, the source on github master branch is best to reference as the source of truth.

The scale-info crate now lives in a separate repository, and is at this time using version 2.1.2. I see no HashMap implementation.

You should very likely not be using the crates.io versions of Substrate and SCALE info. Instead, it is best now to use the most recent release of Polkadot tagged versions of things in your projects, like the devhub node template latest tag uses: https://github.com/substrate-developer-hub/substrate-node-template/tree/latest

All docs.substrate.io examples use this as a reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.