Target specific benches

For dependencies you can use

[target.'cfg(unix)'.dependencies]

to specify target-specific dependencies. How can you do the same for benches?

Using [[target.'cfg(unix)'.bench]] instead of [[bench]] does not work and results in this warning:

warning: <dir>/benches/Cargo.toml: unused manifest key: target.cfg(unix).bench

The RFC for the [package.supported-targets] field mentions adding said field to a target table as a future possibility for extending the RFC:

which would at least fail compiling a benchmark for a platform it is not designed to run on, judging from the RFC's description. I would presume one would design this in a way that cargo bench --target=x86_64-pc-windows-msvc will ignore all benchmarks that don't support the x86_64-pc-windows-msvc platform.