Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/cargo/core/resolver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,6 @@ fn activate_deps_loop<'a>(
&mut remaining_candidates,
&mut conflicting_activations,
).ok_or_else(|| {
// if we hit an activation error and we are out of other combinations
// then just report that error
activation_error(
&cx,
registry,
Expand Down Expand Up @@ -827,8 +825,13 @@ fn activate_deps_loop<'a>(

// Add an entry to the `backtrack_stack` so
// we can try the next one if this one fails.
if has_another && successfully_activated {
backtrack_stack.push(backtrack);
if successfully_activated {
if has_another {
backtrack_stack.push(backtrack);
}
} else {
// `activate` changed `cx` and then failed so put things back.
cx = backtrack.context_backup;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/generate_lockfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fn no_index_update() {
.build();

assert_that(p.cargo("generate-lockfile"),
execs().with_status(0).with_stdout("")
execs().with_stdout("")
.with_stderr_contains(" Updating registry `https://github.com/rust-lang/crates.io-index`"));

assert_that(p.cargo("generate-lockfile").masquerade_as_nightly_cargo().arg("-Zno-index-update"),
Expand Down