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
fix comments about trait solver cycle heads
  • Loading branch information
calvinhirsch committed Sep 9, 2025
commit 7c20f9c5888ff8ebe66997c2eca504a521d49dd8
4 changes: 2 additions & 2 deletions compiler/rustc_type_ir/src/search_graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D> {
encountered_overflow |= stack_entry.encountered_overflow;
debug_assert_eq!(stack_entry.input, input);

// If the current goal is not the root of a cycle, we are done.
// If the current goal is not a cycle head, we are done.
//
// There are no provisional cache entries which depend on this goal.
let Some(usages) = stack_entry.usages else {
Expand All @@ -1278,7 +1278,7 @@ impl<D: Delegate<Cx = X>, X: Cx> SearchGraph<D> {
//
// Check whether we reached a fixpoint, either because the final result
// is equal to the provisional result of the previous iteration, or because
// this was only the root of either coinductive or inductive cycles, and the
// this was only the head of either coinductive or inductive cycles, and the
// final result is equal to the initial response for that case.
if self.reached_fixpoint(cx, &stack_entry, usages, result) {
self.rebase_provisional_cache_entries(&stack_entry, |_, result| result);
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_type_ir/src/search_graph/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rustc_index::newtype_index! {
pub(super) struct StackDepth {}
}

/// Stack entries of the evaluation stack. Its fields tend to be lazily
/// Stack entries of the evaluation stack. Its fields tend to be lazily updated
/// when popping a child goal or completely immutable.
#[derive_where(Debug; X: Cx)]
pub(super) struct StackEntry<X: Cx> {
Expand Down Expand Up @@ -42,7 +42,7 @@ pub(super) struct StackEntry<X: Cx> {
/// Whether evaluating this goal encountered overflow. Lazily updated.
pub encountered_overflow: bool,

/// Whether and how this goal has been used as the root of a cycle. Lazily updated.
/// Whether and how this goal has been used as a cycle head. Lazily updated.
pub usages: Option<HeadUsages>,

/// We want to be able to ignore head usages if they happen inside of candidates
Expand Down
Loading