I would like to ensure that some-crate is used with the same version in normal builds and tests. But now I have specified the version twice, making it easy to forget changing one of them.
Simply removing the version specification from the dev-dependencies results in a warning that this will become an error in the future.
How can I make the version of some-crate in the dev-dependencies depend on the version of some-crate in the dependencies? The docs don't contain anything about this.
I want to use this for a single-crate repository. Do I need to move my crate into a subfolder for this, or can I somehow have a workspace Cargo.toml and a crate Cargo.toml in the same directory?
You can define a workspace in a single Cargo.toml, but it actually looks like you don't even need to do that. Just adding a [workspace.dependencies] section to a normal crate appears to work without any other changes.