Formatting, weird because I just did that

This commit is contained in:
Amanda Stjerna 2024-05-17 15:12:31 +02:00
parent 905db03b28
commit 582c613be8
2 changed files with 5 additions and 4 deletions

View File

@ -62,7 +62,8 @@ impl scc::Annotation for RegionTracker {
impl RegionTracker { impl RegionTracker {
pub fn new(rvid: RegionVid, definition: &RegionDefinition<'_>) -> Self { pub fn new(rvid: RegionVid, definition: &RegionDefinition<'_>) -> Self {
let (representative_is_placeholder, representative_is_existential) = match definition.origin { let (representative_is_placeholder, representative_is_existential) = match definition.origin
{
rustc_infer::infer::NllRegionVariableOrigin::FreeRegion => (false, false), rustc_infer::infer::NllRegionVariableOrigin::FreeRegion => (false, false),
rustc_infer::infer::NllRegionVariableOrigin::Placeholder(_) => (true, false), rustc_infer::infer::NllRegionVariableOrigin::Placeholder(_) => (true, false),
rustc_infer::infer::NllRegionVariableOrigin::Existential { .. } => (false, true), rustc_infer::infer::NllRegionVariableOrigin::Existential { .. } => (false, true),
@ -71,7 +72,6 @@ impl RegionTracker {
let placeholder_universe = let placeholder_universe =
if representative_is_placeholder { definition.universe } else { UniverseIndex::ROOT }; if representative_is_placeholder { definition.universe } else { UniverseIndex::ROOT };
Self { Self {
max_placeholder_universe_reached: placeholder_universe, max_placeholder_universe_reached: placeholder_universe,
min_reachable_universe: definition.universe, min_reachable_universe: definition.universe,

View File

@ -396,7 +396,9 @@ where
loop { loop {
debug!("find_state(r = {node:?} in state {:?})", self.node_states[node]); debug!("find_state(r = {node:?} in state {:?})", self.node_states[node]);
match self.node_states[node] { match self.node_states[node] {
s @ (NodeState::NotVisited | NodeState::BeingVisited{..} | NodeState::InCycle { .. }) => break s, s @ (NodeState::NotVisited
| NodeState::BeingVisited { .. }
| NodeState::InCycle { .. }) => break s,
NodeState::InCycleWith { parent } => { NodeState::InCycleWith { parent } => {
// We test this, to be extremely sure that we never // We test this, to be extremely sure that we never
// ever break our termination condition for the // ever break our termination condition for the
@ -409,7 +411,6 @@ where
previous_node = node; previous_node = node;
node = parent; node = parent;
} }
} }
} }
}; };