specifying different versions in unconditional and target-specific dependency sections causes "multiple rmeta candidates" error #8032
Labels
A-crate-dependencies
Area: [dependencies] of any kind
A-diagnostics
Area: Error and warning messages generated by Cargo itself.
A-target-dependencies
Area: [target.'cfg(foo)'.dependencies]
C-bug
Category: bug
S-needs-design
Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Problem
In a situation like:
cargo
tries to include bothlazy_static
libraries, which fails with a "multiple rmeta candidates" error because it can't pick the right library.Steps
or uncomment the line in
src/lib.rs
then runcargo build
.Possible Solution(s)
Ideally this situation would be detected by
cargo
, at least when it notices that it's about to put multiple conflicting library paths in the same command.I guess this is similar to the whole specialization issue in Rust, so if we wawnt to get fancy enough maybe non-overlapping specializations could be allowed?
Notes
Output of
cargo version
:This is with the standard
rustup
stable toolchain on MacOS.The text was updated successfully, but these errors were encountered: