1
Fork 0

Use assert_matches around the compiler

This commit is contained in:
Michael Goulet 2024-08-11 12:10:36 -04:00
parent 68d2e8a66e
commit c361c924a0
39 changed files with 100 additions and 49 deletions

View file

@ -8,6 +8,7 @@
//! Typical examples would include: minimum element in SCC, maximum element
//! reachable from it, etc.
use std::assert_matches::debug_assert_matches;
use std::fmt::Debug;
use std::ops::Range;
@ -569,7 +570,7 @@ where
// This None marks that we still have the initialize this node's frame.
debug!(?depth, ?node);
debug_assert!(matches!(self.node_states[node], NodeState::NotVisited));
debug_assert_matches!(self.node_states[node], NodeState::NotVisited);
// Push `node` onto the stack.
self.node_states[node] = NodeState::BeingVisited {

View file

@ -18,6 +18,7 @@
#![feature(array_windows)]
#![feature(ascii_char)]
#![feature(ascii_char_variants)]
#![feature(assert_matches)]
#![feature(auto_traits)]
#![feature(cfg_match)]
#![feature(core_intrinsics)]