Closed mutantbob closed 2 years ago
We can't do anything about problems in old releases, so there's nothing to do here. This isn't an issue in the newest release.
@Darksonn i have this just now..
error[E0433]: failed to resolve: use of undeclared crate or module tracing
--> /Users/mgt/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/sync/rwlock.rs:432:7
|
432 | #[tracing::instrument]
| ^^^^^^^ use of undeclared crate or module tracing
It looks like you have accidentally modified your local copy of Tokio, because this is how the relevant line of code looks in version 1.37.0 of Tokio:
I recommend that you delete the tokio-1.37.0
folder in your registry index and let cargo redownload it.
@Darksonn i am not aware of changing anything manually in .cargo (how would I?).
Last thing i changed was adding a .cargo/config.toml and ran cargo clean.
But I just came back here anyway to report that deleting the entire cargo registry fixed the issue, so now i just have to find out how that file could have been changed. Thanks
I've sometimes seen people modify their registry accidentally when they go-to-definition in their IDE. That might be what happened.
I've sometimes seen people modify their registry accidentally when they go-to-definition in their IDE. That might be what happened.
Yup. Happened to me for another repo just yesterday.
cargo should make those files readonly by default
Version
tokio v1.17.0 tokio-util v0.7.1
Platform
Linux herakleion 5.4.72-gentoo #1 SMP Fri Nov 13 19:51:13 EST 2020 x86_64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz GenuineIntel GNU/Linux
Description I dusted off an old app that uses the
reqwest
crate and tried to compile it and got the following error:cargo tree reports
Cargo.toml is
reqwest.rs is
common.rs is
Cargo.lock is
The problem evaporated after a
cargo update
, but there may be other old apps with aCargo.lock
that triggers this problem.