Remove unnecessary warning line

This commit is contained in:
Wim Looman 2023-05-26 20:27:34 +02:00
parent 49cc60b1aa
commit 3dec6f234d
No known key found for this signature in database
GPG Key ID: C6F5748C6DD1607B
2 changed files with 6 additions and 14 deletions

View File

@ -1003,17 +1003,11 @@ impl<'cfg> Workspace<'cfg> {
.max() .max()
{ {
let resolver = edition.default_resolve_behavior().to_manifest(); let resolver = edition.default_resolve_behavior().to_manifest();
self.config.shell().warn( self.config.shell().warn(format_args!("some crates are on edition {edition} which defaults to `resolver = \"{resolver}\"`, but virtual workspaces default to `resolver = \"1\"`"))?;
format_args!("\
some crates are on edition {edition} which defaults to `resolver = \"{resolver}\"`,\n\
\x20 but virtual workspaces default to `resolver = \"1\"`\n\
\x20 specify the desired resolver version explicitly in the workspace root's manifest\
",
))?;
self.config.shell().note( self.config.shell().note(
"to keep the current resolver, specify `workspace.resolver = \"1\"`", "to keep the current resolver, specify `workspace.resolver = \"1\"` in the workspace root's manifest",
)?; )?;
self.config.shell().note(format_args!("to use the edition {edition} resolver, specify `workspace.resolver = \"{resolver}\"`"))?; self.config.shell().note(format_args!("to use the edition {edition} resolver, specify `workspace.resolver = \"{resolver}\"` in the workspace root's manifest"))?;
} }
} }
} }

View File

@ -1431,11 +1431,9 @@ fn edition_2021_workspace_member() {
p.cargo("check") p.cargo("check")
.with_stderr( .with_stderr(
"\ "\
warning: some crates are on edition 2021 which defaults to `resolver = \"2\"`, warning: some crates are on edition 2021 which defaults to `resolver = \"2\"`, but virtual workspaces default to `resolver = \"1\"`
but virtual workspaces default to `resolver = \"1\"` note: to keep the current resolver, specify `workspace.resolver = \"1\"` in the workspace root's manifest
specify the desired resolver version explicitly in the workspace root's manifest note: to use the edition 2021 resolver, specify `workspace.resolver = \"2\"` in the workspace root's manifest
note: to keep the current resolver, specify `workspace.resolver = \"1\"`
note: to use the edition 2021 resolver, specify `workspace.resolver = \"2\"`
[CHECKING] a v0.1.0 [..] [CHECKING] a v0.1.0 [..]
[FINISHED] [..] [FINISHED] [..]
", ",