Skip to content

Regression: the target/rust-analyzer directory ignores .cargo/config.toml #20133

Open
@ia0

Description

@ia0

rust-analyzer version: N/A (I'm assuming this is VSCode specific)
rustc version: rustc 1.90.0-nightly (f26e58023 2025-06-30)
editor or extension: Emacs (using eglot for LSP)
relevant settings:

code snippet to reproduce:

# /tmp/bug/.cargo/config.toml
[build]
target-dir = "target"
/tmp/bug % cargo new foo
/tmp/bug % edit foo/src/main.rs
/tmp/bug % find . -name target
./target
./foo/target
/tmp/bug % tree foo/target
foo/target
└── rust-analyzer
    └── metadata
        ├── sysroot
        │   └── Cargo.lock
        └── workspace
            └── Cargo.lock

5 directories, 2 files

It seems target/rust-analyzer is a new thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions