Skip to content

Commit 5907db6

Browse files
committed
Fix warning for resolve mismatch in workspace.
1 parent 7e1011d commit 5907db6

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/cargo/core/workspace.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,9 @@ impl<'cfg> Workspace<'cfg> {
792792
if !manifest.patch().is_empty() {
793793
emit_warning("patch")?;
794794
}
795-
if manifest.resolve_behavior() != self.resolve_behavior {
795+
if manifest.resolve_behavior().is_some()
796+
&& manifest.resolve_behavior() != self.resolve_behavior
797+
{
796798
// Only warn if they don't match.
797799
emit_warning("resolver")?;
798800
}

tests/testsuite/features2.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,6 +1592,17 @@ fn resolver_enables_new_features() {
15921592
p.cargo("run --bin a")
15931593
.masquerade_as_nightly_cargo()
15941594
.env("EXPECTED_FEATS", "1")
1595+
.with_stderr(
1596+
"\
1597+
[UPDATING] [..]
1598+
[DOWNLOADING] crates ...
1599+
[DOWNLOADED] common [..]
1600+
[COMPILING] common v1.0.0
1601+
[COMPILING] a v0.1.0 [..]
1602+
[FINISHED] [..]
1603+
[RUNNING] `target/debug/a[EXE]`
1604+
",
1605+
)
15951606
.run();
15961607

15971608
// only normal+dev

0 commit comments

Comments
 (0)