@@ -28,7 +28,7 @@ use middle::cstore;
2828
2929use syntax:: ast:: { self , IntTy , UintTy } ;
3030use syntax:: codemap:: { FileName , FilePathMapping } ;
31- use syntax:: epoch :: Epoch ;
31+ use syntax:: edition :: Edition ;
3232use syntax:: parse:: token;
3333use syntax:: parse;
3434use syntax:: symbol:: Symbol ;
@@ -771,7 +771,7 @@ macro_rules! options {
771771 Some ( "`string` or `string=string`" ) ;
772772 pub const parse_lto: Option <& ' static str > =
773773 Some ( "one of `thin`, `fat`, or omitted" ) ;
774- pub const parse_epoch : Option <& ' static str > =
774+ pub const parse_edition : Option <& ' static str > =
775775 Some ( "one of: `2015`, `2018`" ) ;
776776 }
777777
@@ -780,7 +780,7 @@ macro_rules! options {
780780 use super :: { $struct_name, Passes , SomePasses , AllPasses , Sanitizer , Lto } ;
781781 use rustc_back:: { LinkerFlavor , PanicStrategy , RelroLevel } ;
782782 use std:: path:: PathBuf ;
783- use syntax:: epoch :: Epoch ;
783+ use syntax:: edition :: Edition ;
784784
785785 $(
786786 pub fn $opt( cg: & mut $struct_name, v: Option <& str >) -> bool {
@@ -983,11 +983,11 @@ macro_rules! options {
983983 true
984984 }
985985
986- fn parse_epoch ( slot: & mut Epoch , v: Option <& str >) -> bool {
986+ fn parse_edition ( slot: & mut Edition , v: Option <& str >) -> bool {
987987 match v {
988988 Some ( s) => {
989- let epoch = s. parse( ) ;
990- if let Ok ( parsed) = epoch {
989+ let edition = s. parse( ) ;
990+ if let Ok ( parsed) = edition {
991991 * slot = parsed;
992992 true
993993 } else {
@@ -1280,10 +1280,10 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
12801280 `everybody_loops` (all function bodies replaced with `loop {}`),
12811281 `hir` (the HIR), `hir,identified`, or
12821282 `hir,typed` (HIR with types for each node)." ) ,
1283- epoch : Epoch = ( Epoch :: Epoch2015 , parse_epoch , [ TRACKED ] ,
1284- "The epoch to build Rust with. Newer epochs may include features
1285- that require breaking changes. The default epoch is 2015 (the first
1286- epoch ). Crates compiled with different epochs can be linked together." ) ,
1283+ edition : Edition = ( Edition :: Edition2015 , parse_edition , [ TRACKED ] ,
1284+ "The edition to build Rust with. Newer editions may include features
1285+ that require breaking changes. The default edition is 2015 (the first
1286+ edition ). Crates compiled with different editions can be linked together." ) ,
12871287 run_dsymutil: Option <bool > = ( None , parse_opt_bool, [ TRACKED ] ,
12881288 "run `dsymutil` and delete intermediate object files" ) ,
12891289 ui_testing: bool = ( false , parse_bool, [ UNTRACKED ] ,
@@ -2258,7 +2258,7 @@ mod dep_tracking {
22582258 use std:: hash:: Hash ;
22592259 use std:: path:: PathBuf ;
22602260 use std:: collections:: hash_map:: DefaultHasher ;
2261- use super :: { CrateType , DebugInfoLevel , Epoch , ErrorOutputType , Lto , OptLevel , OutputTypes ,
2261+ use super :: { CrateType , DebugInfoLevel , Edition , ErrorOutputType , Lto , OptLevel , OutputTypes ,
22622262 Passes , Sanitizer } ;
22632263 use syntax:: feature_gate:: UnstableFeatures ;
22642264 use rustc_back:: { PanicStrategy , RelroLevel } ;
@@ -2320,7 +2320,7 @@ mod dep_tracking {
23202320 impl_dep_tracking_hash_via_hash ! ( cstore:: NativeLibraryKind ) ;
23212321 impl_dep_tracking_hash_via_hash ! ( Sanitizer ) ;
23222322 impl_dep_tracking_hash_via_hash ! ( Option <Sanitizer >) ;
2323- impl_dep_tracking_hash_via_hash ! ( Epoch ) ;
2323+ impl_dep_tracking_hash_via_hash ! ( Edition ) ;
23242324
23252325 impl_dep_tracking_hash_for_sortable_vec_of ! ( String ) ;
23262326 impl_dep_tracking_hash_for_sortable_vec_of ! ( PathBuf ) ;
0 commit comments