Open Arichy opened 3 months ago
You need a proper cargo workspace structure to work with rust code - except passing it directly to rustc with some flags -.
Such single .rs
file doesn't have any necessary informations like dependencies, editions, etc.
Same issue for me, while playing VSCode LeetCode.
@GF-Huang Do you have a Cargo project your file is included in?
@GF-Huang Do you have a Cargo project your file is included in?
No, because I want single file analysis.
@GF-Huang rust-analyzer does not support full analysis for single file (the closest will be cargo script). If you want IDE services, you need to create a Cargo project.
@GF-Huang rust-analyzer does not support full analysis for single file (the closest will be cargo script). If you want IDE services, you need to create a Cargo project.
when?
@simon-eon When what?
rust-analyzer version: 0.3.2070-standalone
rustc version: 1.77.2
editor or extension: vscode v0.3.2070
Just create an
add.rs
in the root of a JS repo, it has no hints.