rust 由于解析器默认值,货物穿梭运行失败

kxkpmulp  于 2023-08-05  发布在  其他
关注(0)|答案(1)|浏览(171)

在项目目录中运行cargo shuttle run时,我得到以下错误消息

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

字符串

hm2xizp9

hm2xizp91#

这是一个使用cargo workspaces特性的项目。解决方案是在根目录的Cargo.toml中定义解析器。

[workspaces]
resolver = "2"

字符串
对于Rust edition 2021,首选的方法是在Cargo.toml中声明版本。Rust 2021的解析器默认为2。

edition = "2021"

相关问题