@@ -143,8 +143,8 @@ pub fn build_configuration(sess: &Session) -> ast::CrateConfig {
143143fn parse_cfgspecs ( cfgspecs : Vec < ~str > )
144144 -> ast:: CrateConfig {
145145 cfgspecs. move_iter ( ) . map ( |s| {
146- parse:: parse_meta_from_source_str ( "cfgspec" . to_str ( ) ,
147- s,
146+ parse:: parse_meta_from_source_str ( "cfgspec" . to_strbuf ( ) ,
147+ s. to_strbuf ( ) ,
148148 Vec :: new ( ) ,
149149 & parse:: new_parse_sess ( ) )
150150 } ) . collect :: < ast:: CrateConfig > ( )
@@ -175,8 +175,8 @@ pub fn phase_1_parse_input(sess: &Session, cfg: ast::CrateConfig, input: &Input)
175175 parse:: parse_crate_from_file ( & ( * file) , cfg. clone ( ) , & sess. parse_sess )
176176 }
177177 StrInput ( ref src) => {
178- parse:: parse_crate_from_source_str ( anon_src ( ) ,
179- ( * src) . clone ( ) ,
178+ parse:: parse_crate_from_source_str ( anon_src ( ) . to_strbuf ( ) ,
179+ src. to_strbuf ( ) ,
180180 cfg. clone ( ) ,
181181 & sess. parse_sess )
182182 }
@@ -528,7 +528,7 @@ fn write_out_deps(sess: &Session,
528528 // write Makefile-compatible dependency rules
529529 let files: Vec < ~str > = sess. codemap ( ) . files . borrow ( )
530530 . iter ( ) . filter ( |fmap| fmap. is_real_file ( ) )
531- . map ( |fmap| fmap. name . clone ( ) )
531+ . map ( |fmap| fmap. name . to_owned ( ) )
532532 . collect ( ) ;
533533 let mut file = try!( io:: File :: create ( & deps_filename) ) ;
534534 for path in out_filenames. iter ( ) {
@@ -604,20 +604,20 @@ impl pprust::PpAnn for IdentifiedAnnotation {
604604 match node {
605605 pprust:: NodeItem ( item) => {
606606 try!( pp:: space ( & mut s. s ) ) ;
607- s. synth_comment ( item. id . to_str ( ) )
607+ s. synth_comment ( item. id . to_str ( ) . to_strbuf ( ) )
608608 }
609609 pprust:: NodeBlock ( blk) => {
610610 try!( pp:: space ( & mut s. s ) ) ;
611- s. synth_comment ( "block " . to_owned ( ) + blk. id . to_str ( ) )
611+ s. synth_comment ( ( format ! ( "block {}" , blk. id) ) . to_strbuf ( ) )
612612 }
613613 pprust:: NodeExpr ( expr) => {
614614 try!( pp:: space ( & mut s. s ) ) ;
615- try!( s. synth_comment ( expr. id . to_str ( ) ) ) ;
615+ try!( s. synth_comment ( expr. id . to_str ( ) . to_strbuf ( ) ) ) ;
616616 s. pclose ( )
617617 }
618618 pprust:: NodePat ( pat) => {
619619 try!( pp:: space ( & mut s. s ) ) ;
620- s. synth_comment ( "pat " . to_owned ( ) + pat. id . to_str ( ) )
620+ s. synth_comment ( ( format ! ( "pat {}" , pat. id) ) . to_strbuf ( ) )
621621 }
622622 }
623623 }
@@ -692,7 +692,7 @@ pub fn pretty_print_input(sess: Session,
692692 pprust:: print_crate ( sess. codemap ( ) ,
693693 sess. diagnostic ( ) ,
694694 & krate,
695- src_name,
695+ src_name. to_strbuf ( ) ,
696696 & mut rdr,
697697 out,
698698 & IdentifiedAnnotation ,
@@ -707,7 +707,7 @@ pub fn pretty_print_input(sess: Session,
707707 pprust:: print_crate ( annotation. analysis . ty_cx . sess . codemap ( ) ,
708708 annotation. analysis . ty_cx . sess . diagnostic ( ) ,
709709 & krate,
710- src_name,
710+ src_name. to_strbuf ( ) ,
711711 & mut rdr,
712712 out,
713713 & annotation,
@@ -717,7 +717,7 @@ pub fn pretty_print_input(sess: Session,
717717 pprust:: print_crate ( sess. codemap ( ) ,
718718 sess. diagnostic ( ) ,
719719 & krate,
720- src_name,
720+ src_name. to_strbuf ( ) ,
721721 & mut rdr,
722722 out,
723723 & pprust:: NoAnn ,
0 commit comments