diff options
| author | lcnr <rust@lcnr.de> | 2024-07-23 13:14:19 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-08-12 10:33:04 +0200 |
| commit | e87157ba2a63edae640f294531d1b9f3e8d37a2e (patch) | |
| tree | d54149f6284c0a96cf282afdb9b3b99e57bd4f2c | |
| parent | 51338ca0eb9a6b83fa3b743e102155ef145faf1f (diff) | |
| download | rust-e87157ba2a63edae640f294531d1b9f3e8d37a2e.tar.gz rust-e87157ba2a63edae640f294531d1b9f3e8d37a2e.zip | |
simplify match + move `debug!` call
| -rw-r--r-- | compiler/rustc_type_ir/src/search_graph/mod.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_type_ir/src/search_graph/mod.rs b/compiler/rustc_type_ir/src/search_graph/mod.rs index 7d4ddb71461..6c67bf13ac7 100644 --- a/compiler/rustc_type_ir/src/search_graph/mod.rs +++ b/compiler/rustc_type_ir/src/search_graph/mod.rs @@ -106,6 +106,7 @@ pub enum UsageKind { impl UsageKind { fn merge(self, other: Self) -> Self { match (self, other) { + (UsageKind::Mixed, _) | (_, UsageKind::Mixed) => UsageKind::Mixed, (UsageKind::Single(lhs), UsageKind::Single(rhs)) => { if lhs == rhs { UsageKind::Single(lhs) @@ -113,9 +114,6 @@ impl UsageKind { UsageKind::Mixed } } - (UsageKind::Mixed, UsageKind::Mixed) - | (UsageKind::Mixed, UsageKind::Single(_)) - | (UsageKind::Single(_), UsageKind::Mixed) => UsageKind::Mixed, } } } @@ -458,7 +456,7 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D> { for _ in 0..D::FIXPOINT_STEP_LIMIT { match self.fixpoint_step_in_task(cx, input, inspect, &mut prove_goal) { StepResult::Done(final_entry, result) => return (final_entry, result), - StepResult::HasChanged => debug!("fixpoint changed provisional results"), + StepResult::HasChanged => {} } } @@ -623,6 +621,7 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D> { if D::reached_fixpoint(cx, usage_kind, input, stack_entry.provisional_result, result) { StepResult::Done(stack_entry, result) } else { + debug!(?result, "fixpoint changed provisional results"); let depth = self.stack.push(StackEntry { has_been_used: None, provisional_result: Some(result), |
