Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit e87157b

Browse files
committed
simplify match + move debug! call
1 parent 51338ca commit e87157b

File tree

1 file changed

+3
-4
lines changed
  • compiler/rustc_type_ir/src/search_graph

1 file changed

+3
-4
lines changed

compiler/rustc_type_ir/src/search_graph/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,14 @@ pub enum UsageKind {
106106
impl UsageKind {
107107
fn merge(self, other: Self) -> Self {
108108
match (self, other) {
109+
(UsageKind::Mixed, _) | (_, UsageKind::Mixed) => UsageKind::Mixed,
109110
(UsageKind::Single(lhs), UsageKind::Single(rhs)) => {
110111
if lhs == rhs {
111112
UsageKind::Single(lhs)
112113
} else {
113114
UsageKind::Mixed
114115
}
115116
}
116-
(UsageKind::Mixed, UsageKind::Mixed)
117-
| (UsageKind::Mixed, UsageKind::Single(_))
118-
| (UsageKind::Single(_), UsageKind::Mixed) => UsageKind::Mixed,
119117
}
120118
}
121119
}
@@ -458,7 +456,7 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D> {
458456
for _ in 0..D::FIXPOINT_STEP_LIMIT {
459457
match self.fixpoint_step_in_task(cx, input, inspect, &mut prove_goal) {
460458
StepResult::Done(final_entry, result) => return (final_entry, result),
461-
StepResult::HasChanged => debug!("fixpoint changed provisional results"),
459+
StepResult::HasChanged => {}
462460
}
463461
}
464462

@@ -623,6 +621,7 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D> {
623621
if D::reached_fixpoint(cx, usage_kind, input, stack_entry.provisional_result, result) {
624622
StepResult::Done(stack_entry, result)
625623
} else {
624+
debug!(?result, "fixpoint changed provisional results");
626625
let depth = self.stack.push(StackEntry {
627626
has_been_used: None,
628627
provisional_result: Some(result),

0 commit comments

Comments
 (0)