You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following toml settings is part of a rust project. Note that it specify the features in the vm-memory dependency.
[package]
name = "vmm"version = "0.1.0"authors = ["Amazon Firecracker team <firecracker-devel@amazon.com>"]
edition = "2021"license = "Apache-2.0"
[dependencies]
vm-memory = { version = "0.13.1", features = ["backend-mmap", "backend-bitmap"] }
I have set the rust-analyzer.cargo.features to default value (i.e. []) and DO NOT enable allFeatures.
When I edit the .rs source code files in the project directory, everything works fine, and the RA seems to recognize the features in Cargo.toml, i.e., it enables the "backend-mmap" and "backend-bitmap".
But when I jump into the source code files in the dependency crate (e.g., files in ~/.cargo/registry/src/......), which is outside the project directory, the RA DO NOT enable "backend-mmap" and "backend-bitmap". RA seems use the rust-analyzer.cargo.features for those files outside the project directory, instead of using that in [dependencies] section in Cargo.toml.
My questions are:
Why features in [dependencies] not enable when I jump into source code in the dependency crate? Is there something I missed?
Because I do not want to enable all features in the dependencies (which means I do not want to enable rust-analyzer.cargo.allFeatures), how can RA only enables the features in the [dependencies] section in Cargo.toml when I jump into the source code files in that crate?
The text was updated successfully, but these errors were encountered:
The following toml settings is part of a rust project. Note that it specify the features in the
vm-memory
dependency.I have set the
rust-analyzer.cargo.features
to default value (i.e.[]
) and DO NOT enableallFeatures
.When I edit the
.rs
source code files in the project directory, everything works fine, and the RA seems to recognize the features inCargo.toml
, i.e., it enables the"backend-mmap"
and"backend-bitmap"
.But when I jump into the source code files in the dependency crate (e.g., files in
~/.cargo/registry/src/......
), which is outside the project directory, the RA DO NOT enable"backend-mmap"
and"backend-bitmap"
. RA seems use therust-analyzer.cargo.features
for those files outside the project directory, instead of using that in [dependencies] section inCargo.toml
.My questions are:
rust-analyzer.cargo.allFeatures
), how can RA only enables the features in the [dependencies] section inCargo.toml
when I jump into the source code files in that crate?The text was updated successfully, but these errors were encountered: