Skip to content

Commit 876f6de

Browse files
committed
fixed code to placate new restrictions on form of function/method invocations.
1 parent b03a0b2 commit 876f6de

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/libsyntax/parse/comments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ fn all_whitespace(s: &str, col: CharPos) -> Option<uint> {
206206
let mut col = col.to_uint();
207207
let mut cursor: uint = 0;
208208
while col > 0 && cursor < len {
209-
let r: str::CharRange = str::char_range_at(s, cursor);
209+
let r: str::CharRange = s.char_range_at(cursor);
210210
if !r.ch.is_whitespace() {
211211
return None;
212212
}

src/test/pretty/block-comment-wchar.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@
109109
'\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200A',
110110
'\u2028', '\u2029', '\u202F', '\u205F', '\u3000'];
111111
// <= bugs in pretty-printer?
112-
for vec::each(chars) |c| {
112+
for chars.each |c| {
113113
let ws = c.is_whitespace();
114-
io::println(fmt!("%? %?" , c , ws));
114+
println(fmt!("%? %?" , c , ws));
115115
}
116116
}

src/test/pretty/block-comment-wchar.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ fn main() {
102102
'\xA0', '\u1680', '\u180E', '\u2000', '\u2001', '\u2002', '\u2003',
103103
'\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200A',
104104
'\u2028', '\u2029', '\u202F', '\u205F', '\u3000'];
105-
for vec::each(chars) |c| {
105+
for chars.each |c| {
106106
let ws = c.is_whitespace();
107-
io::println(fmt!("%? %?", c , ws)); // <= bugs in pretty-printer?
107+
println(fmt!("%? %?", c , ws)); // <= bugs in pretty-printer?
108108
}
109109
}

0 commit comments

Comments
 (0)