File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -778,8 +778,6 @@ fn activate_deps_loop<'a>(
778
778
& mut remaining_candidates,
779
779
& mut conflicting_activations,
780
780
) . ok_or_else ( || {
781
- // if we hit an activation error and we are out of other combinations
782
- // then just report that error
783
781
activation_error (
784
782
& cx,
785
783
registry,
@@ -827,8 +825,13 @@ fn activate_deps_loop<'a>(
827
825
828
826
// Add an entry to the `backtrack_stack` so
829
827
// we can try the next one if this one fails.
830
- if has_another && successfully_activated {
831
- backtrack_stack. push ( backtrack) ;
828
+ if successfully_activated {
829
+ if has_another {
830
+ backtrack_stack. push ( backtrack) ;
831
+ }
832
+ } else {
833
+ // `activate` changed `cx` and then failed so put things back.
834
+ cx = backtrack. context_backup ;
832
835
}
833
836
}
834
837
}
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ fn no_index_update() {
88
88
. build ( ) ;
89
89
90
90
assert_that ( p. cargo ( "generate-lockfile" ) ,
91
- execs ( ) . with_status ( 0 ) . with_stdout ( "" )
91
+ execs ( ) . with_stdout ( "" )
92
92
. with_stderr_contains ( " Updating registry `https://github.com/rust-lang/crates.io-index`" ) ) ;
93
93
94
94
assert_that ( p. cargo ( "generate-lockfile" ) . masquerade_as_nightly_cargo ( ) . arg ( "-Zno-index-update" ) ,
You can’t perform that action at this time.
0 commit comments