Skip to content

Commit

Permalink
Merge inherent impl blocks for `Diverges
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Sep 19, 2019
1 parent 034a8fd commit d67528f
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/librustc_typeck/check/mod.rs
Expand Up @@ -470,16 +470,6 @@ pub enum Diverges {
WarnedAlways
}

impl Diverges {
/// Creates a `Diverges::Always` with the provided `span` and the default note message.
fn always(span: Span) -> Diverges {
Diverges::Always {
span,
custom_note: None
}
}
}

// Convenience impls for combinig `Diverges`.

impl ops::BitAnd for Diverges {
Expand Down Expand Up @@ -509,6 +499,14 @@ impl ops::BitOrAssign for Diverges {
}

impl Diverges {
/// Creates a `Diverges::Always` with the provided `span` and the default note message.
fn always(span: Span) -> Diverges {
Diverges::Always {
span,
custom_note: None
}
}

fn is_always(self) -> bool {
// Enum comparison ignores the
// contents of fields, so we just
Expand Down

0 comments on commit d67528f

Please sign in to comment.