rust-analyzer: errors are not displayed

I have a very simple program as below in the VSCode:

fn main() {
    let f = open("test");
    println!("Hello, world!");
}

Rust analyzer doesn’t show any errors as expected. Nothing on problems tab.

Other features seems to work.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 7
  • Comments: 37 (20 by maintainers)

Commits related to this issue

Most upvoted comments

So doesn’t work with workspace? that’s bummer. I have lots of rust projects.

It’s weird. it works in one workspace and but doesn’t work in other workspace even thought projects are same.

I also see this in problem:

[Error - 9:40:25 AM] Request textDocument/foldingRange failed.
  Message: Rust file outside current workspace is not supported yet.
  Code: -32600 

I was able to see error if I only have this project in a workspace but doesn’t work when other projects are loaded. I see Cargo check is running and is reporting some warning but somehow doesn’t seem to check this project if other projects are loaded

Wait, are you using Code workspaces? rust-analyzer doesn’t work great on them.

I also get those “canceled by client” errors and cargo check works fine for me, so it’s probably unrelated.