@@ -28,7 +28,7 @@ use middle::cstore;
28
28
29
29
use syntax:: ast:: { self , IntTy , UintTy } ;
30
30
use syntax:: codemap:: { FileName , FilePathMapping } ;
31
- use syntax:: epoch :: Epoch ;
31
+ use syntax:: edition :: Edition ;
32
32
use syntax:: parse:: token;
33
33
use syntax:: parse;
34
34
use syntax:: symbol:: Symbol ;
@@ -771,7 +771,7 @@ macro_rules! options {
771
771
Some ( "`string` or `string=string`" ) ;
772
772
pub const parse_lto: Option <& ' static str > =
773
773
Some ( "one of `thin`, `fat`, or omitted" ) ;
774
- pub const parse_epoch : Option <& ' static str > =
774
+ pub const parse_edition : Option <& ' static str > =
775
775
Some ( "one of: `2015`, `2018`" ) ;
776
776
}
777
777
@@ -780,7 +780,7 @@ macro_rules! options {
780
780
use super :: { $struct_name, Passes , SomePasses , AllPasses , Sanitizer , Lto } ;
781
781
use rustc_back:: { LinkerFlavor , PanicStrategy , RelroLevel } ;
782
782
use std:: path:: PathBuf ;
783
- use syntax:: epoch :: Epoch ;
783
+ use syntax:: edition :: Edition ;
784
784
785
785
$(
786
786
pub fn $opt( cg: & mut $struct_name, v: Option <& str >) -> bool {
@@ -983,11 +983,11 @@ macro_rules! options {
983
983
true
984
984
}
985
985
986
- fn parse_epoch ( slot: & mut Epoch , v: Option <& str >) -> bool {
986
+ fn parse_edition ( slot: & mut Edition , v: Option <& str >) -> bool {
987
987
match v {
988
988
Some ( s) => {
989
- let epoch = s. parse( ) ;
990
- if let Ok ( parsed) = epoch {
989
+ let edition = s. parse( ) ;
990
+ if let Ok ( parsed) = edition {
991
991
* slot = parsed;
992
992
true
993
993
} else {
@@ -1280,10 +1280,10 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
1280
1280
`everybody_loops` (all function bodies replaced with `loop {}`),
1281
1281
`hir` (the HIR), `hir,identified`, or
1282
1282
`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." ) ,
1287
1287
run_dsymutil: Option <bool > = ( None , parse_opt_bool, [ TRACKED ] ,
1288
1288
"run `dsymutil` and delete intermediate object files" ) ,
1289
1289
ui_testing: bool = ( false , parse_bool, [ UNTRACKED ] ,
@@ -2258,7 +2258,7 @@ mod dep_tracking {
2258
2258
use std:: hash:: Hash ;
2259
2259
use std:: path:: PathBuf ;
2260
2260
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 ,
2262
2262
Passes , Sanitizer } ;
2263
2263
use syntax:: feature_gate:: UnstableFeatures ;
2264
2264
use rustc_back:: { PanicStrategy , RelroLevel } ;
@@ -2320,7 +2320,7 @@ mod dep_tracking {
2320
2320
impl_dep_tracking_hash_via_hash ! ( cstore:: NativeLibraryKind ) ;
2321
2321
impl_dep_tracking_hash_via_hash ! ( Sanitizer ) ;
2322
2322
impl_dep_tracking_hash_via_hash ! ( Option <Sanitizer >) ;
2323
- impl_dep_tracking_hash_via_hash ! ( Epoch ) ;
2323
+ impl_dep_tracking_hash_via_hash ! ( Edition ) ;
2324
2324
2325
2325
impl_dep_tracking_hash_for_sortable_vec_of ! ( String ) ;
2326
2326
impl_dep_tracking_hash_for_sortable_vec_of ! ( PathBuf ) ;
0 commit comments