diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 51381447fedc..1d68d79db885 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -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 { @@ -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