Skip to content

Fixed feature detection in new Cargo build-dir layout - #338

Merged
dtolnay merged 1 commit into
dtolnay:masterfrom
ranger-ross:fix-new-build-dir-layout
Aug 2, 2026
Merged

Fixed feature detection in new Cargo build-dir layout#338
dtolnay merged 1 commit into
dtolnay:masterfrom
ranger-ross:fix-new-build-dir-layout

Conversation

@ranger-ross

Copy link
Copy Markdown
Contributor

This PR adds support for the Cargo build-dir layout.
Currently the feature detection silently fails on the new layout as the logic expect a specific file layout.

The build-dir file tree layout is considered an internal implementation detail of Cargo but Cargo also does not yet provide a stable interface to get this information :(
So the approach is keep relying on the Cargo internals but add support for the new v2 layout.

fixes #336

I tested this fix in a reproduction repo https://github.com/ranger-ross/trybuild-336 and it fixes the issue.

@dtolnay dtolnay left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dtolnay
dtolnay merged commit 11fa743 into dtolnay:master Aug 2, 2026
12 checks passed
@dtolnay

dtolnay commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Published in 1.0.119.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo build-dir-new-layout breaks feature detection

2 participants