Skip to content

Creating target director in crate folder with target-dir set in .cargo/config.toml #20070

Open
@ronnodas

Description

@ronnodas

rust-analyzer version: 0.3.2509-standalone

rustc version: rustc 1.87.0 (17067e9ac 2025-05-09)

editor or extension: VS Code, on Windows with WSL

relevant settings:
Contents of ~/.cargo/config.toml:

[build]
target-dir = "rust-builds"

Rust analyzer is creating a target directory at the project root and storing Cargo.lock files in subdirectories. I don't want to have a target directory in my crate root, which is why I have config.toml set up as above, so that all the build files are in ~/rust-builds.

This seems to be have started today, so possibly related to #20018 ?

Metadata

Metadata

Assignees

Labels

A-cargocargo related issuesBroken WindowBugs / technical debt to be addressed immediatelyC-bugCategory: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions