@@ -143,8 +143,8 @@ pub fn build_configuration(sess: &Session) -> ast::CrateConfig {
143
143
fn parse_cfgspecs ( cfgspecs : Vec < ~str > )
144
144
-> ast:: CrateConfig {
145
145
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 ( ) ,
148
148
Vec :: new ( ) ,
149
149
& parse:: new_parse_sess ( ) )
150
150
} ) . collect :: < ast:: CrateConfig > ( )
@@ -175,8 +175,8 @@ pub fn phase_1_parse_input(sess: &Session, cfg: ast::CrateConfig, input: &Input)
175
175
parse:: parse_crate_from_file ( & ( * file) , cfg. clone ( ) , & sess. parse_sess )
176
176
}
177
177
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 ( ) ,
180
180
cfg. clone ( ) ,
181
181
& sess. parse_sess )
182
182
}
@@ -528,7 +528,7 @@ fn write_out_deps(sess: &Session,
528
528
// write Makefile-compatible dependency rules
529
529
let files: Vec < ~str > = sess. codemap ( ) . files . borrow ( )
530
530
. iter ( ) . filter ( |fmap| fmap. is_real_file ( ) )
531
- . map ( |fmap| fmap. name . clone ( ) )
531
+ . map ( |fmap| fmap. name . to_owned ( ) )
532
532
. collect ( ) ;
533
533
let mut file = try!( io:: File :: create ( & deps_filename) ) ;
534
534
for path in out_filenames. iter ( ) {
@@ -604,20 +604,20 @@ impl pprust::PpAnn for IdentifiedAnnotation {
604
604
match node {
605
605
pprust:: NodeItem ( item) => {
606
606
try!( pp:: space ( & mut s. s ) ) ;
607
- s. synth_comment ( item. id . to_str ( ) )
607
+ s. synth_comment ( item. id . to_str ( ) . to_strbuf ( ) )
608
608
}
609
609
pprust:: NodeBlock ( blk) => {
610
610
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 ( ) )
612
612
}
613
613
pprust:: NodeExpr ( expr) => {
614
614
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 ( ) ) ) ;
616
616
s. pclose ( )
617
617
}
618
618
pprust:: NodePat ( pat) => {
619
619
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 ( ) )
621
621
}
622
622
}
623
623
}
@@ -692,7 +692,7 @@ pub fn pretty_print_input(sess: Session,
692
692
pprust:: print_crate ( sess. codemap ( ) ,
693
693
sess. diagnostic ( ) ,
694
694
& krate,
695
- src_name,
695
+ src_name. to_strbuf ( ) ,
696
696
& mut rdr,
697
697
out,
698
698
& IdentifiedAnnotation ,
@@ -707,7 +707,7 @@ pub fn pretty_print_input(sess: Session,
707
707
pprust:: print_crate ( annotation. analysis . ty_cx . sess . codemap ( ) ,
708
708
annotation. analysis . ty_cx . sess . diagnostic ( ) ,
709
709
& krate,
710
- src_name,
710
+ src_name. to_strbuf ( ) ,
711
711
& mut rdr,
712
712
out,
713
713
& annotation,
@@ -717,7 +717,7 @@ pub fn pretty_print_input(sess: Session,
717
717
pprust:: print_crate ( sess. codemap ( ) ,
718
718
sess. diagnostic ( ) ,
719
719
& krate,
720
- src_name,
720
+ src_name. to_strbuf ( ) ,
721
721
& mut rdr,
722
722
out,
723
723
& pprust:: NoAnn ,
0 commit comments