Skip to content

Commit 3dec6f2

Browse files
committed
Remove unnecessary warning line
1 parent 49cc60b commit 3dec6f2

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

src/cargo/core/workspace.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -1003,17 +1003,11 @@ impl<'cfg> Workspace<'cfg> {
10031003
.max()
10041004
{
10051005
let resolver = edition.default_resolve_behavior().to_manifest();
1006-
self.config.shell().warn(
1007-
format_args!("\
1008-
some crates are on edition {edition} which defaults to `resolver = \"{resolver}\"`,\n\
1009-
\x20 but virtual workspaces default to `resolver = \"1\"`\n\
1010-
\x20 specify the desired resolver version explicitly in the workspace root's manifest\
1011-
",
1012-
))?;
1006+
self.config.shell().warn(format_args!("some crates are on edition {edition} which defaults to `resolver = \"{resolver}\"`, but virtual workspaces default to `resolver = \"1\"`"))?;
10131007
self.config.shell().note(
1014-
"to keep the current resolver, specify `workspace.resolver = \"1\"`",
1008+
"to keep the current resolver, specify `workspace.resolver = \"1\"` in the workspace root's manifest",
10151009
)?;
1016-
self.config.shell().note(format_args!("to use the edition {edition} resolver, specify `workspace.resolver = \"{resolver}\"`"))?;
1010+
self.config.shell().note(format_args!("to use the edition {edition} resolver, specify `workspace.resolver = \"{resolver}\"` in the workspace root's manifest"))?;
10171011
}
10181012
}
10191013
}

tests/testsuite/features2.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1431,11 +1431,9 @@ fn edition_2021_workspace_member() {
14311431
p.cargo("check")
14321432
.with_stderr(
14331433
"\
1434-
warning: some crates are on edition 2021 which defaults to `resolver = \"2\"`,
1435-
but virtual workspaces default to `resolver = \"1\"`
1436-
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\"`
1434+
warning: some crates are on edition 2021 which defaults to `resolver = \"2\"`, but virtual workspaces default to `resolver = \"1\"`
1435+
note: to keep the current resolver, specify `workspace.resolver = \"1\"` in the workspace root's manifest
1436+
note: to use the edition 2021 resolver, specify `workspace.resolver = \"2\"` in the workspace root's manifest
14391437
[CHECKING] a v0.1.0 [..]
14401438
[FINISHED] [..]
14411439
",

0 commit comments

Comments
 (0)