0

I'm learning to use rust,i am using vscode。 I have two cargo projects in my workspace,Why rust-analyzer only has an error message in the first project, but not in the second。 enter image description here

enter image description here

Is there any setting required?

Itsme
  • 76
  • 5

1 Answers1

1

You need to create workspace:

  • Create Cargo.toml in your root project
  • Add this code:
[workspace]
members = [
    "./<your-cargo-project1>",
    "./<your-cargo-project2>",


]
CocDap
  • 180
  • 4