Skip to content

Commit 5fea76b

Browse files
committed
never use a generalized in an error message
1 parent 3da71e8 commit 5fea76b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/cargo/core/resolver/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ fn activate_deps_loop(
297297
// As we mentioned above with the `backtracked` variable if this
298298
// local is set to `true` then our `conflicting_activations` may
299299
// not be right, so we can't push into our global cache.
300+
let mut generalize_conflicting_activations = None;
300301
if !just_here_for_the_error_messages && !backtracked {
301302
past_conflicting_activations.insert(&dep, &conflicting_activations);
302303
if let Some(c) = generalize_conflicting(
@@ -307,7 +308,7 @@ fn activate_deps_loop(
307308
&dep,
308309
&conflicting_activations,
309310
) {
310-
conflicting_activations = c;
311+
generalize_conflicting_activations = Some(c);
311312
}
312313
}
313314

@@ -316,7 +317,9 @@ fn activate_deps_loop(
316317
&mut backtrack_stack,
317318
&parent,
318319
backtracked,
319-
&conflicting_activations,
320+
generalize_conflicting_activations
321+
.as_ref()
322+
.unwrap_or(&conflicting_activations),
320323
) {
321324
Some((candidate, has_another, frame)) => {
322325
// Reset all of our local variables used with the
@@ -885,7 +888,7 @@ fn generalize_conflicting(
885888
// and let `jumpback_critical_id` figure this out.
886889
return None;
887890
}
888-
// What parents dose that critical activation have
891+
// What parents does that critical activation have
889892
for (critical_parent, critical_parents_deps) in
890893
cx.parents.edges(&jumpback_critical_id).filter(|(p, _)| {
891894
// it will only help backjump further if it is older then the critical_age

0 commit comments

Comments
 (0)