Skip to content

Commit

Permalink
Derive Eq and Hash for ControlFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
inquisitivecrystal committed Oct 19, 2022
1 parent 46244f3 commit 4a92cf6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/core/src/ops/control_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ use crate::{convert, ops};
/// [`Break`]: ControlFlow::Break
/// [`Continue`]: ControlFlow::Continue
#[stable(feature = "control_flow_enum_type", since = "1.55.0")]
#[derive(Debug, Clone, Copy, PartialEq)]
// ControlFlow should not implement PartialOrd or Ord, per RFC 3058:
// https://rust-lang.github.io/rfcs/3058-try-trait-v2.html#traits-for-controlflow
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum ControlFlow<B, C = ()> {
/// Move on to the next phase of the operation as normal.
#[stable(feature = "control_flow_enum_type", since = "1.55.0")]
Expand Down

0 comments on commit 4a92cf6

Please sign in to comment.