about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2019-09-18 21:57:50 -0400
committerAaron Hill <aa1ronham@gmail.com>2019-09-18 21:57:50 -0400
commitd67528ff7dbbe226fa583b9585cee2138533770e (patch)
tree386863fe6b083a43c560f493bfc93f4b9421d38c
parent034a8fd1dff9bff585a6152bf5c52e882a2bb28b (diff)
downloadrust-d67528ff7dbbe226fa583b9585cee2138533770e.tar.gz
rust-d67528ff7dbbe226fa583b9585cee2138533770e.zip
Merge inherent impl blocks for `Diverges
-rw-r--r--src/librustc_typeck/check/mod.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index 51381447fed..1d68d79db88 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