0

When running cargo shuttle run in my project's directory, I got the following error message

warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
Matilda Smeds
  • 1,384
  • 11
  • 18

1 Answers1

1

This is a project that uses the the cargo workspaces feature. The solution was to define the resolver in the root directory's Cargo.toml.

[workspaces]
resolver = "2"

For Rust edition 2021 the preferred way is to declare the edition in the Cargo.toml. The resolver then defaults to 2 for Rust 2021.

edition = "2021"
Matilda Smeds
  • 1,384
  • 11
  • 18