Skip to content

Commit

Permalink
Remove unnecessary warning line
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo157 committed May 26, 2023
1 parent 49cc60b commit 3dec6f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
12 changes: 3 additions & 9 deletions src/cargo/core/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1003,17 +1003,11 @@ impl<'cfg> Workspace<'cfg> {
.max()
{
let resolver = edition.default_resolve_behavior().to_manifest();
self.config.shell().warn(
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().warn(format_args!("some crates are on edition {edition} which defaults to `resolver = \"{resolver}\"`, but virtual workspaces default to `resolver = \"1\"`"))?;
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"))?;
}
}
}
Expand Down
8 changes: 3 additions & 5 deletions tests/testsuite/features2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1431,11 +1431,9 @@ fn edition_2021_workspace_member() {
p.cargo("check")
.with_stderr(
"\
warning: some crates are on edition 2021 which defaults to `resolver = \"2\"`,
but virtual workspaces default to `resolver = \"1\"`
specify the desired resolver version explicitly 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\"`
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
[CHECKING] a v0.1.0 [..]
[FINISHED] [..]
",
Expand Down

0 comments on commit 3dec6f2

Please sign in to comment.