Instead, this happened: building the standard library failed with this error: error[E0433]: failed to resolve: use of undeclared crate or module `slice` --> /localhome/somers/.rustup/toolchains/nightly-x86_64-unknown-freebsd/lib/rustlib/src/rust/library/std/src/sys/pal/unix/thread.rs:272...
当你在Rust项目中遇到“use of undeclared crate or module rand”这样的错误时,这通常意味着rand crate没有被正确地添加到你的项目依赖中,或者在代码中没有被正确地引用。以下是一些解决这个问题的步骤: 1. 检查Cargo.toml文件 首先,确保你的Cargo.toml文件中已经包含了rand crate作为依赖。如果还没有,你需要添加...
I'm getting this error: error[E0433]: failed to resolve: use of undeclared crate or module `tracing` --> C:\Users\fred\.cargo\registry\src\index.crates.io-6f17d22bba15001f\axum-extra-0.9.4\src\typed_header.rs:161:9 | 161 | axum_core::__l...