Skip to content

Unable to use cargo 0.55 as library #9744

@msrd0

Description

@msrd0

Problem

I just tried to update the cargo version from 0.54 to 0.55 and hit the following compile error:

error[E0432]: unresolved import `cargo_util::registry`
  --> /home/msrd0/.cargo/registry/src/github.spider-man.dpdns.org-1ecc6299db9ec823/cargo-0.55.0/src/cargo/sources/registry/index.rs:75:25
   |
75 | use cargo_util::{paths, registry::make_dep_path};
   |                         ^^^^^^^^ could not find `registry` in `cargo_util`

error[E0432]: unresolved import `cargo_util::registry`
  --> /home/msrd0/.cargo/registry/src/github.spider-man.dpdns.org-1ecc6299db9ec823/cargo-0.55.0/src/cargo/sources/registry/remote.rs:12:25
   |
12 | use cargo_util::{paths, registry::make_dep_path, Sha256};
   |                         ^^^^^^^^ could not find `registry` in `cargo_util`

The only compatible version of cargo_util published on crates.io at the time of writing is 0.1.0, which is what's being used according to the Cargo.lock file.

Steps

  1. Run cargo init
  2. Add cargo = "0.55" dependency to Cargo.toml file
  3. Run cargo check

Notes

cargo +stable version
cargo 1.54.0 (5ae8d74b3 2021-06-22)

OS: ArchLinux

Metadata

Metadata

Assignees

Labels

C-bugCategory: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions