cargo: Latest released version does not compile
Problem
The cargo library doesn’t build at 0.50.0 (latest released version) and 0.52.0. However it does at master.
Steps
git checkout 67a00f95b(supposedly 0.50.0) orgit checkout 60143816b(supposedly 0.52.0)cargo build --release --lib- The following error is displayed:
error[E0283]: type annotations needed
--> src/cargo/util/config/de.rs:530:63
|
530 | seed.deserialize(Tuple2Deserializer(1i32, env.as_ref()))
| ----^^^^^^--
| | |
| | cannot infer type for type parameter `T` declared on the trait `AsRef`
| this method call resolves to `&T`
|
= note: cannot satisfy `std::string::String: AsRef<_>`
help: use the fully qualified path for the potential candidates
|
530 | seed.deserialize(Tuple2Deserializer(1i32, <std::string::String as AsRef<OsStr>>::as_ref(env)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
530 | seed.deserialize(Tuple2Deserializer(1i32, <std::string::String as AsRef<std::path::Path>>::as_ref(env)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
530 | seed.deserialize(Tuple2Deserializer(1i32, <std::string::String as AsRef<str>>::as_ref(env)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
530 | seed.deserialize(Tuple2Deserializer(1i32, <std::string::String as AsRef<[u8]>>::as_ref(env)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0283`.
error: could not compile `cargo`
To learn more, run the command again with --verbose.
Possible Solution(s)
Bump and release version 0.53.0.
Notes
Output of cargo version: cargo 1.51.0-nightly (c3abcfe8a 2021-01-25)
Output of rustc version: rustc 1.51.0-nightly (04caa632d 2021-01-30)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 16 (11 by maintainers)
Commits related to this issue
- Disable cargo outdated test in travis The tool doesn't build due to https://github.com/rust-lang/cargo/issues/9124. — committed to ia0/data-encoding by ia0 3 years ago
- Add `--locked` option to `cargo install cargo-udeps` as a workaround for rust-lang/cargo#9124. — committed to qryxip/cargo-compete by qryxip 3 years ago
- Add `--locked` option to `cargo install cargo-udeps` as a workaround for rust-lang/cargo#9124. — committed to qryxip/cargo-compete by qryxip 3 years ago
- Auto merge of #9129 - Eh2406:backport-serde, r=alexcrichton Backport #9102 to the 1.50 release branch As per https://github.com/rust-lang/cargo/issues/9124#issuecomment-771941676 here is a backport ... — committed to rust-lang/cargo by bors 3 years ago
- rust cargo 0.50.1 Bump rust cargo to version 0.50.1 since build on Mac OS X did fail, see also this bug discription: https://github.com/rust-lang/cargo/issues/9124 — committed to newkit/homebrew-core by deleted user 3 years ago
- Update to cargo 0.50.1 This works around the cargo compilation issue here: https://github.com/rust-lang/cargo/issues/9124 — committed to kevswims/cargo-bitbake by deleted user 3 years ago
You can also try if
cargo install --lockedworks for you.0.50.1 is out now (and the latest released version). I confirm that running
cargo updateon cargo-udeps does not break the build any more.We discussed it in today’s Cargo meeting. We are good to do a patch release of the library when a PR bacporting #9101 is merged.