From d67528ff7dbbe226fa583b9585cee2138533770e Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Wed, 18 Sep 2019 21:57:50 -0400 Subject: [PATCH] Merge inherent impl blocks for `Diverges --- src/librustc_typeck/check/mod.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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