From 92d39fe4d5e5ad3d2c2dcafe45eaf6e23edddfd7 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sun, 12 May 2013 00:25:31 -0400 Subject: syntax: Remove #[allow(vecs_implicitly_copyable)] --- src/libsyntax/print/pp.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libsyntax/print/pp.rs') diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs index 43f62d72a9f..7944469cb96 100644 --- a/src/libsyntax/print/pp.rs +++ b/src/libsyntax/print/pp.rs @@ -457,9 +457,9 @@ pub impl Printer { } } } - fn print_str(&mut self, s: ~str) { + fn print_str(&mut self, s: &str) { while self.pending_indentation > 0 { - (*self.out).write_str(~" "); + (*self.out).write_str(" "); self.pending_indentation -= 1; } (*self.out).write_str(s); @@ -562,16 +562,16 @@ pub fn end(p: @mut Printer) { p.pretty_print(END); } pub fn eof(p: @mut Printer) { p.pretty_print(EOF); } -pub fn word(p: @mut Printer, wrd: ~str) { - p.pretty_print(STRING(@/*bad*/ copy wrd, wrd.len() as int)); +pub fn word(p: @mut Printer, wrd: &str) { + p.pretty_print(STRING(@/*bad*/ wrd.to_owned(), wrd.len() as int)); } -pub fn huge_word(p: @mut Printer, wrd: ~str) { - p.pretty_print(STRING(@/*bad*/ copy wrd, size_infinity)); +pub fn huge_word(p: @mut Printer, wrd: &str) { + p.pretty_print(STRING(@/*bad*/ wrd.to_owned(), size_infinity)); } -pub fn zero_word(p: @mut Printer, wrd: ~str) { - p.pretty_print(STRING(@/*bad*/ copy wrd, 0)); +pub fn zero_word(p: @mut Printer, wrd: &str) { + p.pretty_print(STRING(@/*bad*/ wrd.to_owned(), 0)); } pub fn spaces(p: @mut Printer, n: uint) { break_offset(p, n, 0); } -- cgit 1.4.1-3-g733a5