Skip to content

Commit 9e86985

Browse files
committed
Add notes on how to configure the virtual workspace's resolver
1 parent 7067d0d commit 9e86985

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/cargo/core/workspace.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,8 @@ impl<'cfg> Workspace<'cfg> {
10101010
\x20 specify the desired resolver version explicitly in the workspace root's manifest\
10111011
",
10121012
))?;
1013+
self.config.shell().note("to keep the current resolver, specify `workspace.resolver = \"1\"`")?;
1014+
self.config.shell().note(format_args!("to use the edition {edition} resolver, specify `workspace.resolver = \"{resolver}\"`"))?;
10131015
}
10141016
}
10151017
}

tests/testsuite/features2.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,8 @@ fn edition_2021_workspace_member() {
14341434
warning: some crates are on edition 2021 which defaults to `resolver = \"2\"`,
14351435
but virtual workspaces default to `resolver = \"1\"`
14361436
specify the desired resolver version explicitly in the workspace root's manifest
1437+
note: to keep the current resolver, specify `workspace.resolver = \"1\"`
1438+
note: to use the edition 2021 resolver, specify `workspace.resolver = \"2\"`
14371439
[CHECKING] a v0.1.0 [..]
14381440
[FINISHED] [..]
14391441
",

0 commit comments

Comments
 (0)