Skip to content

Commit 49cc60b

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

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/cargo/core/workspace.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,10 @@ 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(
1014+
"to keep the current resolver, specify `workspace.resolver = \"1\"`",
1015+
)?;
1016+
self.config.shell().note(format_args!("to use the edition {edition} resolver, specify `workspace.resolver = \"{resolver}\"`"))?;
10131017
}
10141018
}
10151019
}

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)