Skip to content

build-std: ERROR Received compiler message for unknown package #21602

@Paladynee

Description

@Paladynee

Short description

enabling build-std in .cargo/config.toml will result in ERRORs in the Output panel of VSCode pointing to compiler builtins.

Minimal reproduction:

https://github.com/tristanpoland/test_analyzer_bug
default hello world program, with .cargo/config.toml containing this:

[unstable]
build-std = ["core"]

It'll give these lines in the Output > rust-analyzer Language Server section:

[Error - 12:37:36 AM] Server process exited with code 0.
2026-02-08T00:37:36.907400434+01:00 ERROR Received compiler message for unknown package: path+file:///home/eurydice/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/compiler-builtins/compiler-builtins#compiler_builtins@0.1.160
 path+file:///home/eurydice/coreign/rustaxiomtest#0.1.0
2026-02-08T00:37:36.907447367+01:00 ERROR Received compiler message for unknown package: path+file:///home/eurydice/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/compiler-builtins/compiler-builtins#compiler_builtins@0.1.160
 path+file:///home/eurydice/coreign/rustaxiomtest#0.1.0

I don't know if these lines mean anything or if something failed at all, but I was having other problems in one of my local workspaces when I came across these lines in the output, and it looks like it's reproducible on nightly and stable, on both linux and windows.

rust-analyzer version: 1.95.0-nightly (f889772 2026-02-05) [/home/eurydice/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rust-analyzer]
rustc 1.95.0-nightly (f889772d6 2026-02-05)

extension version: rust-analyzer v0.3.2777

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cargocargo related issuesC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions