@@ -62,11 +62,11 @@ pub enum PpMode {
6262 */
6363pub fn anon_src ( ) -> @str { @"<anon>" }
6464
65- pub fn source_name(input: &input ) -> @str {
65+ pub fn source_name(input: &Input ) -> @str {
6666 match *input {
6767 // FIXME (#9639): This needs to handle non-utf8 paths
68- file_input (ref ifile) => ifile.as_str().unwrap().to_managed(),
69- str_input (_) => anon_src()
68+ FileInput (ref ifile) => ifile.as_str().unwrap().to_managed(),
69+ StrInput (_) => anon_src()
7070 }
7171}
7272
@@ -133,22 +133,22 @@ fn parse_cfgspecs(cfgspecs: ~[~str], demitter: @diagnostic::Emitter)
133133 } ) . collect :: < ast:: CrateConfig > ( )
134134}
135135
136- pub enum input {
136+ pub enum Input {
137137 /// Load source from file
138- file_input ( Path ) ,
138+ FileInput ( Path ) ,
139139 /// The string is the source
140140 // FIXME (#2319): Don't really want to box the source string
141- str_input ( @str )
141+ StrInput ( @str )
142142}
143143
144- pub fn phase_1_parse_input ( sess : Session , cfg : ast:: CrateConfig , input : & input )
144+ pub fn phase_1_parse_input ( sess : Session , cfg : ast:: CrateConfig , input : & Input )
145145 -> ast:: Crate {
146146 time ( sess. time_passes ( ) , "parsing" , ( ) , |_| {
147147 match * input {
148- file_input ( ref file) => {
148+ FileInput ( ref file) => {
149149 parse:: parse_crate_from_file ( & ( * file) , cfg. clone ( ) , sess. parse_sess )
150150 }
151- str_input ( src) => {
151+ StrInput ( src) => {
152152 parse:: parse_crate_from_source_str (
153153 anon_src ( ) , src, cfg. clone ( ) , sess. parse_sess )
154154 }
@@ -444,7 +444,7 @@ pub fn stop_after_phase_5(sess: Session) -> bool {
444444 return false ;
445445}
446446
447- fn write_out_deps ( sess : Session , input : & input , outputs : & OutputFilenames , crate : & ast:: Crate )
447+ fn write_out_deps ( sess : Session , input : & Input , outputs : & OutputFilenames , crate : & ast:: Crate )
448448{
449449 let lm = link:: build_link_meta ( sess, crate . attrs, & outputs. obj_filename ,
450450 & mut :: util:: sha2:: Sha256 :: new ( ) ) ;
@@ -460,12 +460,12 @@ fn write_out_deps(sess: Session, input: &input, outputs: &OutputFilenames, crate
460460 ( true , Some ( ref filename) ) => filename. clone ( ) ,
461461 // Use default filename: crate source filename with extension replaced by ".d"
462462 ( true , None ) => match * input {
463- file_input ( ref input_path) => {
463+ FileInput ( ref input_path) => {
464464 let filestem = input_path. filestem ( ) . expect ( "input file must have stem" ) ;
465465 let filename = out_filenames[ 0 ] . dir_path ( ) . join ( filestem) . with_extension ( "d" ) ;
466466 filename
467467 } ,
468- str_input ( ..) => {
468+ StrInput ( ..) => {
469469 sess. warn ( "can not write --dep-info without a filename when compiling stdin." ) ;
470470 return ;
471471 } ,
@@ -495,7 +495,7 @@ fn write_out_deps(sess: Session, input: &input, outputs: &OutputFilenames, crate
495495 }
496496}
497497
498- pub fn compile_input ( sess : Session , cfg : ast:: CrateConfig , input : & input ,
498+ pub fn compile_input ( sess : Session , cfg : ast:: CrateConfig , input : & Input ,
499499 outdir : & Option < Path > , output : & Option < Path > ) {
500500 // We need nested scopes here, because the intermediate results can keep
501501 // large chunks of memory alive and we want to free them as soon as
@@ -587,7 +587,7 @@ impl pprust::PpAnn for TypedAnnotation {
587587
588588pub fn pretty_print_input ( sess : Session ,
589589 cfg : ast:: CrateConfig ,
590- input : & input ,
590+ input : & Input ,
591591 ppm : PpMode ) {
592592 let crate = phase_1_parse_input ( sess, cfg. clone ( ) , input) ;
593593
@@ -664,9 +664,9 @@ static architecture_abis : &'static [(&'static str, abi::Architecture)] = &'stat
664664
665665 ( "mips" , abi:: Mips ) ] ;
666666
667- pub fn build_target_config ( sopts : @session:: options ,
667+ pub fn build_target_config ( sopts : @session:: Options ,
668668 demitter : @diagnostic:: Emitter )
669- -> @session:: config {
669+ -> @session:: Config {
670670 let os = match get_os ( sopts. target_triple ) {
671671 Some ( os) => os,
672672 None => early_error ( demitter, "unknown operating system" )
@@ -689,7 +689,7 @@ pub fn build_target_config(sopts: @session::options,
689689 abi:: Arm => arm:: get_target_strs ( target_triple, os) ,
690690 abi:: Mips => mips:: get_target_strs ( target_triple, os)
691691 } ;
692- let target_cfg = @session:: config {
692+ let target_cfg = @session:: Config {
693693 os : os,
694694 arch : arch,
695695 target_strs : target_strs,
@@ -714,7 +714,7 @@ pub fn host_triple() -> ~str {
714714pub fn build_session_options ( binary : ~str ,
715715 matches : & getopts:: Matches ,
716716 demitter : @diagnostic:: Emitter )
717- -> @session:: options {
717+ -> @session:: Options {
718718 let mut outputs = ~[ ] ;
719719 if matches. opt_present ( "rlib" ) {
720720 outputs. push ( session:: OutputRlib )
@@ -862,7 +862,7 @@ pub fn build_session_options(binary: ~str,
862862 matches. opt_present ( "crate-name" ) ,
863863 matches. opt_present ( "crate-file-name" ) ) ;
864864
865- let sopts = @session:: options {
865+ let sopts = @session:: Options {
866866 outputs : outputs,
867867 gc : gc,
868868 optimize : opt_level,
@@ -895,7 +895,7 @@ pub fn build_session_options(binary: ~str,
895895 return sopts;
896896}
897897
898- pub fn build_session ( sopts : @session:: options , demitter : @diagnostic:: Emitter )
898+ pub fn build_session ( sopts : @session:: Options , demitter : @diagnostic:: Emitter )
899899 -> Session {
900900 let codemap = @codemap:: CodeMap :: new ( ) ;
901901 let diagnostic_handler =
@@ -905,7 +905,7 @@ pub fn build_session(sopts: @session::options, demitter: @diagnostic::Emitter)
905905 build_session_ ( sopts, codemap, demitter, span_diagnostic_handler)
906906}
907907
908- pub fn build_session_ ( sopts : @session:: options ,
908+ pub fn build_session_ ( sopts : @session:: Options ,
909909 cm : @codemap:: CodeMap ,
910910 demitter : @diagnostic:: Emitter ,
911911 span_diagnostic_handler : @diagnostic:: SpanHandler )
@@ -914,7 +914,7 @@ pub fn build_session_(sopts: @session::options,
914914 let p_s = parse:: new_parse_sess_special_handler ( span_diagnostic_handler,
915915 cm) ;
916916 let cstore = @CStore :: new ( token:: get_ident_interner ( ) ) ;
917- let filesearch = filesearch:: mk_filesearch (
917+ let filesearch = @ filesearch:: FileSearch :: new (
918918 & sopts. maybe_sysroot ,
919919 sopts. target_triple ,
920920 sopts. addl_lib_search_paths ) ;
@@ -1046,7 +1046,7 @@ pub struct OutputFilenames {
10461046 obj_filename : Path
10471047}
10481048
1049- pub fn build_output_filenames ( input : & input ,
1049+ pub fn build_output_filenames ( input : & Input ,
10501050 odir : & Option < Path > ,
10511051 ofile : & Option < Path > ,
10521052 attrs : & [ ast:: Attribute ] ,
@@ -1074,15 +1074,15 @@ pub fn build_output_filenames(input: &input,
10741074 let dirpath = match * odir {
10751075 Some ( ref d) => ( * d) . clone ( ) ,
10761076 None => match * input {
1077- str_input ( _) => os:: getcwd ( ) ,
1078- file_input ( ref ifile) => ( * ifile) . dir_path ( )
1077+ StrInput ( _) => os:: getcwd ( ) ,
1078+ FileInput ( ref ifile) => ( * ifile) . dir_path ( )
10791079 }
10801080 } ;
10811081
10821082 let mut stem = match * input {
10831083 // FIXME (#9639): This needs to handle non-utf8 paths
1084- file_input ( ref ifile) => ( * ifile) . filestem_str ( ) . unwrap ( ) . to_managed ( ) ,
1085- str_input ( _) => @"rust_out"
1084+ FileInput ( ref ifile) => ( * ifile) . filestem_str ( ) . unwrap ( ) . to_managed ( ) ,
1085+ StrInput ( _) => @"rust_out"
10861086 } ;
10871087
10881088 // If a crateid is present, we use it as the link name
0 commit comments