Get cargo to build/ test a pre-release?

I'd like to incorporate, build, and test a pre-release package from crates.io.
(It's also written by me, but being used in a larger project.)

Cargo says this:

error: no matching package found
searched package name: `whatever`
prerelease package needs to be specified explicitly
whatever = { version = "3.0.0-pre.2" }

The gist being the prerelease package needs to be specified explicitly.
I am quite happy to explicitly request pre-releases. But have not found anywhere in the cargo help, docs, or manual about how to do so. How does this work?

If I understand correctly, this simply means that pre-release version doesn't match any versions range - only the exact version. How it is specified in your Cargo.toml now, and what's the real version number?

Question withdrawn - user error