Skip to content

Commit 376d5d6

Browse files
committed
Fix fallout from span change
1 parent 30fca57 commit 376d5d6

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

src/test/compile-fail/issue-3044.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn main() {
1212
let needlesArr: ~[char] = ~['a', 'f'];
1313
do needlesArr.iter().fold() |x, y| {
1414
}
15-
//~^ ERROR 1 parameter was supplied (including the closure passed by the `do` keyword)
15+
//~^^ ERROR 1 parameter was supplied (including the closure passed by the `do` keyword)
1616
//
1717
// the first error is, um, non-ideal.
1818
}

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

-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108
'\xA0', '\u1680', '\u180E', '\u2000', '\u2001', '\u2002', '\u2003',
109109
'\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200A',
110110
'\u2028', '\u2029', '\u202F', '\u205F', '\u3000'];
111-
// <= bugs in pretty-printer?
112111
for chars.iter().advance |c| {
113112
let ws = c.is_whitespace();
114113
println(fmt!("%? %?" , c , ws));

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,6 @@ fn main() {
104104
'\u2028', '\u2029', '\u202F', '\u205F', '\u3000'];
105105
for chars.iter().advance |c| {
106106
let ws = c.is_whitespace();
107-
println(fmt!("%? %?", c , ws)); // <= bugs in pretty-printer?
107+
println(fmt!("%? %?", c , ws));
108108
}
109109
}

src/test/pretty/for-comment.rs

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// pp-exact
12+
13+
fn f(v: &[int]) {
14+
let mut n = 0;
15+
for v.iter().advance |e| {
16+
n = *e; // This comment once triggered pretty printer bug
17+
}
18+
}

0 commit comments

Comments
 (0)