Hi. Current VS Code, rustup as it comes from Manjaro x64 (AUR) repository. Since rustup update
today, (re)starting rust-analyzer fails, with both nightly
and stable
:
rust_analyzer::main_loop: FetchWorkspaceError:
rust-analyzer failed to load workspace: Failed to load the project at /home/pkehl/GIT/cfo/Cargo.toml: Failed to read Cargo metadata from Cargo.toml file /home/pkehl/GIT/cfo/Cargo.toml, Some(Version { major: 1, minor: 77, patch: 1 }): Failed to run `cd "/home/pkehl/GIT/cfo" && RUSTUP_TOOLCHAIN="/home/pkehl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu" "/usr/bin/cargo" "metadata" "--format-version" "1" "--manifest-path" "/home/pkehl/GIT/cfo/Cargo.toml" "--filter-platform" "x86_64-unknown-linux-gnu"`: `cargo metadata` exited with an error: error: failed to parse manifest at `/home/pkehl/Cargo.toml`
Caused by:
no targets specified in the manifest
either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present
My projects are non-exotic, pure Rust libraries, created with cargo new
. cargo check
, cargo build` etc. work fine.
Cargo.toml:
[package]
name = "cfo"
version = "0.1.0"
edition = "2021"
categories = ["algorithms", "caching", "data-structures", "no-std", "text-processing"]
# [lib]
[dependencies]
And rustup update:
...
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.77.1 (7cf61ebde 2024-03-27)
beta-x86_64-unknown-linux-gnu unchanged - rustc 1.78.0-beta.5 (9eff51035 2024-04-06)
nightly-i686-unknown-linux-gnu unchanged - rustc 1.79.0-nightly (ab5bda1aa 2024-04-08)
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.79.0-nightly (ab5bda1aa 2024-04-08)
nightly-x86_64-unknown-linux-musl unchanged - (error reading rustc version)