From 1c62f5ff74e8c6d434001d4571e5f28ae2705ed9 Mon Sep 17 00:00:00 2001 From: Michael Sullivan Date: Wed, 11 Jul 2012 16:49:02 -0700 Subject: Get rid of all of the remaining /~s in the code base. --- src/libsyntax/parse/attr.rs | 12 ++++++------ src/libsyntax/parse/comments.rs | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs index e62de46f5db..b10a05d8ca4 100644 --- a/src/libsyntax/parse/attr.rs +++ b/src/libsyntax/parse/attr.rs @@ -50,7 +50,7 @@ impl parser_attr for parser { if self.look_ahead(1u) != token::LBRACKET { break; } - attrs += [self.parse_attribute(ast::attr_outer)]/~; + attrs += ~[self.parse_attribute(ast::attr_outer)]; } token::DOC_COMMENT(s) { let attr = ::attr::mk_sugared_doc_attr( @@ -58,7 +58,7 @@ impl parser_attr for parser { if attr.node.style != ast::attr_outer { self.fatal("expected outer comment"); } - attrs += [attr]/~; + attrs += ~[attr]; self.bump(); } _ { @@ -105,14 +105,14 @@ impl parser_attr for parser { let attr = self.parse_attribute(ast::attr_inner); if self.token == token::SEMI { self.bump(); - inner_attrs += [attr]/~; + inner_attrs += ~[attr]; } else { // It's not really an inner attribute let outer_attr = spanned(attr.span.lo, attr.span.hi, {style: ast::attr_outer, value: attr.node.value, is_sugared_doc: false}); - next_outer_attrs += [outer_attr]/~; + next_outer_attrs += ~[outer_attr]; break; } } @@ -121,9 +121,9 @@ impl parser_attr for parser { *self.get_str(s), self.span.lo, self.span.hi); self.bump(); if attr.node.style == ast::attr_inner { - inner_attrs += [attr]/~; + inner_attrs += ~[attr]; } else { - next_outer_attrs += [attr]/~; + next_outer_attrs += ~[attr]; break; } } diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index 31069225c03..e05887d28b4 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -39,7 +39,7 @@ fn doc_comment_style(comment: str) -> ast::attr_style { fn strip_doc_comment_decoration(comment: str) -> str { /// remove whitespace-only lines from the start/end of lines - fn vertical_trim(lines: [str]/~) -> [str]/~ { + fn vertical_trim(lines: ~[str]) -> ~[str] { let mut i = 0u, j = lines.len(); while i < j && lines[i].trim().is_empty() { i += 1u; @@ -51,7 +51,7 @@ fn strip_doc_comment_decoration(comment: str) -> str { } // drop leftmost columns that contain only values in chars - fn block_trim(lines: [str]/~, chars: str, max: option) -> [str]/~ { + fn block_trim(lines: ~[str], chars: str, max: option) -> ~[str] { let mut i = max.get_default(uint::max_value); for lines.each |line| { @@ -136,7 +136,7 @@ fn consume_whitespace_counting_blank_lines(rdr: string_reader, fn read_shebang_comment(rdr: string_reader, code_to_the_left: bool, - &comments: [cmnt]/~) { + &comments: ~[cmnt]) { #debug(">>> shebang comment"); let p = rdr.chpos; #debug("<<< shebang comment"); @@ -148,7 +148,7 @@ fn read_shebang_comment(rdr: string_reader, code_to_the_left: bool, } fn read_line_comments(rdr: string_reader, code_to_the_left: bool, - &comments: [cmnt]/~) { + &comments: ~[cmnt]) { #debug(">>> line comments"); let p = rdr.chpos; let mut lines: ~[str] = ~[]; @@ -191,7 +191,7 @@ fn trim_whitespace_prefix_and_push_line(&lines: ~[str], } fn read_block_comment(rdr: string_reader, code_to_the_left: bool, - &comments: [cmnt]/~) { + &comments: ~[cmnt]) { #debug(">>> block comment"); let p = rdr.chpos; let mut lines: ~[str] = ~[]; -- cgit 1.4.1-3-g733a5