about summary refs log tree commit diff
path: root/src/libsyntax_pos/edition.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax_pos/edition.rs')
-rw-r--r--src/libsyntax_pos/edition.rs20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/libsyntax_pos/edition.rs b/src/libsyntax_pos/edition.rs
index 727aad546f5..3017191563b 100644
--- a/src/libsyntax_pos/edition.rs
+++ b/src/libsyntax_pos/edition.rs
@@ -1,20 +1,28 @@
-use crate::symbol::{Symbol, sym};
+use crate::symbol::{sym, Symbol};
 use std::fmt;
 use std::str::FromStr;
 
 use rustc_macros::HashStable_Generic;
 
 /// The edition of the compiler (RFC 2052)
-#[derive(Clone, Copy, Hash, PartialEq, PartialOrd, Debug,
-         RustcEncodable, RustcDecodable, Eq, HashStable_Generic)]
+#[derive(
+    Clone,
+    Copy,
+    Hash,
+    PartialEq,
+    PartialOrd,
+    Debug,
+    RustcEncodable,
+    RustcDecodable,
+    Eq,
+    HashStable_Generic
+)]
 pub enum Edition {
     // editions must be kept in order, oldest to newest
-
     /// The 2015 edition
     Edition2015,
     /// The 2018 edition
     Edition2018,
-
     // when adding new editions, be sure to update:
     //
     // - Update the `ALL_EDITIONS` const
@@ -69,7 +77,7 @@ impl FromStr for Edition {
         match s {
             "2015" => Ok(Edition::Edition2015),
             "2018" => Ok(Edition::Edition2018),
-            _ => Err(())
+            _ => Err(()),
         }
     }
 }