@@ -345,13 +345,13 @@ pub fn check_variants_T<T:Copy>(crate: @ast::crate,
345345 intr,
346346 span_handler,
347347 crate2,
348- fname.to_str (),
348+ fname.to_managed (),
349349 rdr,
350350 a,
351351 pprust::no_ann(),
352352 false)
353353 };
354- @ string
354+ string.to_managed()
355355 };
356356 match cx.mode {
357357 tm_converge => check_roundtrip_convergence(str3, 1),
@@ -361,9 +361,9 @@ pub fn check_variants_T<T:Copy>(crate: @ast::crate,
361361 thing_label,
362362 i,
363363 j);
364- let safe_to_run = !(content_is_dangerous_to_run(* str3)
364+ let safe_to_run = !(content_is_dangerous_to_run(str3)
365365 || has_raw_pointers(crate2));
366- check_whole_compiler(* str3,
366+ check_whole_compiler(str3,
367367 &Path(file_label),
368368 safe_to_run);
369369 }
@@ -502,28 +502,28 @@ pub fn check_compiling(filename: &Path) -> happiness {
502502}
503503
504504
505- pub fn parse_and_print(code: @~ str) -> ~ str {
505+ pub fn parse_and_print(code: @str) -> @ str {
506506 let filename = Path("tmp.rs");
507507 let sess = parse::new_parse_sess(option::None);
508- write_file(&filename, * code);
509- let crate = parse::parse_crate_from_source_str(filename.to_str(),
508+ write_file(&filename, code);
509+ let crate = parse::parse_crate_from_source_str(filename.to_str().to_managed() ,
510510 code,
511511 ~[],
512512 sess);
513- do io::with_str_reader(* code) |rdr| {
513+ do io::with_str_reader(code) |rdr| {
514514 let filename = filename.to_str();
515515 do as_str |a| {
516516 pprust::print_crate(sess.cm,
517517 // Assuming there are no token_trees
518518 token::mk_fake_ident_interner(),
519519 copy sess.span_diagnostic,
520520 crate,
521- filename.to_str (),
521+ filename.to_managed (),
522522 rdr,
523523 a,
524524 pprust::no_ann(),
525525 false)
526- }
526+ }.to_managed()
527527 }
528528}
529529
@@ -598,15 +598,15 @@ pub fn file_might_not_converge(filename: &Path) -> bool {
598598 return false;
599599}
600600
601- pub fn check_roundtrip_convergence(code: @~ str, maxIters: uint) {
601+ pub fn check_roundtrip_convergence(code: @str, maxIters: uint) {
602602 let mut i = 0u;
603603 let mut newv = code;
604604 let mut oldv = code;
605605
606606 while i < maxIters {
607607 oldv = newv;
608- if content_might_not_converge(* oldv) { return; }
609- newv = @ parse_and_print(oldv);
608+ if content_might_not_converge(oldv) { return; }
609+ newv = parse_and_print(oldv);
610610 if oldv == newv { break; }
611611 i += 1u;
612612 }
@@ -615,8 +615,8 @@ pub fn check_roundtrip_convergence(code: @~str, maxIters: uint) {
615615 error!("Converged after %u iterations", i);
616616 } else {
617617 error!("Did not converge after %u iterations!", i);
618- write_file(&Path("round-trip-a.rs"), * oldv);
619- write_file(&Path("round-trip-b.rs"), * newv);
618+ write_file(&Path("round-trip-a.rs"), oldv);
619+ write_file(&Path("round-trip-b.rs"), newv);
620620 run::process_status("diff", [~"-w", ~"-u", ~"round-trip-a.rs", ~"round-trip-b.rs"]);
621621 fail!("Mismatch");
622622 }
@@ -626,8 +626,8 @@ pub fn check_convergence(files: &[Path]) {
626626 error!("pp convergence tests: %u files", files.len());
627627 for files.each |file| {
628628 if !file_might_not_converge(file) {
629- let s = @ result::get(&io::read_whole_file_str(file));
630- if !content_might_not_converge(* s) {
629+ let s = result::get(&io::read_whole_file_str(file)).to_managed( );
630+ if !content_might_not_converge(s) {
631631 error!("pp converge: %s", file.to_str());
632632 // Change from 7u to 2u once
633633 // https://github.com/mozilla/rust/issues/850 is fixed
@@ -646,26 +646,26 @@ pub fn check_variants(files: &[Path], cx: Context) {
646646 loop;
647647 }
648648
649- let s = @ result::get(&io::read_whole_file_str(file));
650- if contains(*s, "#" ) {
649+ let s = result::get(&io::read_whole_file_str(file)).to_managed( );
650+ if s.contains_char('#' ) {
651651 loop; // Macros are confusing
652652 }
653- if cx.mode == tm_converge && content_might_not_converge(* s) {
653+ if cx.mode == tm_converge && content_might_not_converge(s) {
654654 loop;
655655 }
656- if cx.mode == tm_run && content_is_dangerous_to_compile(* s) {
656+ if cx.mode == tm_run && content_is_dangerous_to_compile(s) {
657657 loop;
658658 }
659659
660660 let file_str = file.to_str();
661661
662662 error!("check_variants: %?", file_str);
663663 let sess = parse::new_parse_sess(None);
664- let crate = parse::parse_crate_from_source_str(file_str.to_str (),
664+ let crate = parse::parse_crate_from_source_str(file_str.to_managed (),
665665 s,
666666 ~[],
667667 sess);
668- io::with_str_reader(* s, |rdr| {
668+ io::with_str_reader(s, |rdr| {
669669 let file_str = file_str.to_str();
670670 error!("%s",
671671 as_str(|a| {
@@ -675,7 +675,7 @@ pub fn check_variants(files: &[Path], cx: Context) {
675675 token::mk_fake_ident_interner(),
676676 copy sess.span_diagnostic,
677677 crate,
678- file_str.to_str (),
678+ file_str.to_managed (),
679679 rdr,
680680 a,
681681 pprust::no_ann(),
0 commit comments