@@ -27,7 +27,7 @@ use metadata::cstore;
2727use syntax:: ast:: { self , IntTy , UintTy } ;
2828use syntax:: attr;
2929use syntax:: attr:: AttrMetaMethods ;
30- use syntax:: diagnostic:: { ColorConfig , Auto , Always , Never , SpanHandler } ;
30+ use syntax:: diagnostic:: { ColorConfig , SpanHandler } ;
3131use syntax:: parse;
3232use syntax:: parse:: token:: InternedString ;
3333use syntax:: feature_gate:: UnstableFeatures ;
@@ -216,7 +216,7 @@ pub fn basic_options() -> Options {
216216 debugging_opts : basic_debugging_options ( ) ,
217217 prints : Vec :: new ( ) ,
218218 cg : basic_codegen_options ( ) ,
219- color : Auto ,
219+ color : ColorConfig :: Auto ,
220220 show_span : None ,
221221 externs : HashMap :: new ( ) ,
222222 crate_name : None ,
@@ -854,16 +854,17 @@ pub fn parse_cfgspecs(cfgspecs: Vec<String> ) -> ast::CrateConfig {
854854
855855pub fn build_session_options ( matches : & getopts:: Matches ) -> Options {
856856 let color = match matches. opt_str ( "color" ) . as_ref ( ) . map ( |s| & s[ ..] ) {
857- Some ( "auto" ) => Auto ,
858- Some ( "always" ) => Always ,
859- Some ( "never" ) => Never ,
857+ Some ( "auto" ) => ColorConfig :: Auto ,
858+ Some ( "always" ) => ColorConfig :: Always ,
859+ Some ( "never" ) => ColorConfig :: Never ,
860860
861- None => Auto ,
861+ None => ColorConfig :: Auto ,
862862
863863 Some ( arg) => {
864- early_error ( Auto , & format ! ( "argument for --color must be auto, always \
865- or never (instead was `{}`)",
866- arg) )
864+ early_error ( ColorConfig :: Auto ,
865+ & format ! ( "argument for --color must be auto, always \
866+ or never (instead was `{}`)",
867+ arg) )
867868 }
868869 } ;
869870
0 commit comments