summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-11-28 18:25:24 +0100
committerDylan Baker <dylan@pnwbakers.com>2025-12-15 13:26:55 -0800
commit90b40b5de4d267cb3fdb59fe4fac3e438a18ee8d (patch)
tree281ac2db1b712260491fd2790f5922a3801186f5 /docs
parent5cd09bcabcf4845274cf19b9d796517bd4f8fc72 (diff)
downloadmeson-90b40b5de4d267cb3fdb59fe4fac3e438a18ee8d.tar.gz
cargo: include the implicit feature for dependencies in the manifest
Make the implicit `xyz = ["dep:xyz"]` declaration explicit in the Manifest. This also makes it possible to implement correctly the part of the spec where "If you specify the optional dependency with the dep: prefix anywhere in the [features] table, that disables the implicit feature." Unfortunately, this can only be done after target-specific configurations are resolved, which makes it hard to write a unit test for this. Rustix requires it, though; without this patch, something like [package] name = "rustix" edition = "2021" rust-version = "1.63" version = "0.38.34" [dependencies] alloc = { version = "1.0.0", optional = true, package = "rustc-std-workspace-alloc" } libc = { version = "0.2.0", optional = true, package = "libc" } libc_errno = { version = "0.3.8", optional = true, package = "errno" } [features] alloc = [] default = ["std"] rustc-dep-of-std = ["dep:alloc"] std = ["alloc"] use-libc = ["libc_errno", "libc"] would incorrectly request the rustc-std-workspace-alloc crate via the chain default->std->alloc. The patch blocks it because it finds the "dep:alloc" dependency of feature rustc-dep-of-std. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions