Questions tagged [rust-analyzer]

100 questions
0
votes
0 answers

Rust-Analyzer expansion pack is failing to load workspace What's the reason?

I've tried reinstalling Rust and reinstalling the expansion pack I also tried to recreate the project file. However, this error has not been corrected. Why can't I read the Cargo.toml file when it exists?
0
votes
1 answer

Why is rust-analyzer not finding dependencies in workspace member?

I have a cargo workspace with one library "./raytracing" and one binary "./cli". The two workspace members have different dependencies. ./raytracing/Cargo.toml: [package] name = "raytracer" version = "0.1.0" edition = "2021" [dependencies] rand =…
henrylang
  • 3
  • 1
  • 2
0
votes
1 answer

RUST: Is there a more elegent way to import mod?

Here is my project structure: . └── src ├── main.rs ├── sub_folder │   └── mod.rs └── sub_mod.rs in sub_mod.rs, cargo won't warn me if I import sub_folder/ like: #[path = "./sub_folder/mod.rs"] mod sub_folder; but I cannot do mod…
0
votes
1 answer

Rust-analyzer failed to load workspace

rust-analyzer failed to load workspace: Failed to read Cargo metadata from Cargo.tml file /home/eth/Downloads/testing/Cargo.toml, cargo 1.33.0-nightly (0d1f1bbea 2018-12-19): Failed to run '"cargo" "metadata" "--format-version" "1"…
Duet Dusha
  • 11
  • 1
  • 2
0
votes
2 answers

Disable overflow checks in VS Code's rust-analyzer tests but retain println

I need to turn off overflow checks in unit tests. I can use command line to accomplish this using cargo test --release, however: GUI test buttons provided by rust-analyzer provide a better experience, however they're configured to run on debug mode…
secretshardul
  • 1,635
  • 19
  • 31
0
votes
1 answer

coc.nvim: 'self', numbers([0-9]) and strings don't show in CocAction(doHover) show_documentation(?)

coc.nvim: The word 'self', numbers([0-9]) as well as strings don't show in CocAction(doHover); the attached image as an example. This is the case in parameters and arguments in documentation provided by coc.nvim for rust analyzer. When I highlight…
0xba1
  • 76
  • 1
  • 7
-1
votes
0 answers

how to remove the class / object hints from rust-analyzer?

This driving me crazy how do i disable the class / primitive / struct hints from the RUst file for example ;
user63898
  • 29,839
  • 85
  • 272
  • 514
-1
votes
1 answer

How to layout a Rust application for rust-analyser?

I have the following kind of layout that runs fine, but VS Code / rust-analyser choke on it. I want at least my utility functions and macros to show documentation on hover. I realise rustdoc still has a problem documenting normal stuff, so I'm…
Daniel
  • 521
  • 1
  • 4
  • 13
1 2 3 4 5 6
7