let needlesArr: ~[char] = ~['a', 'f'];
do needlesArr.iter().fold() |x, y| {
}
- //~^ ERROR 1 parameter was supplied (including the closure passed by the `do` keyword)
+ //~^^ ERROR 1 parameter was supplied (including the closure passed by the `do` keyword)
//
// the first error is, um, non-ideal.
}
'\xA0', '\u1680', '\u180E', '\u2000', '\u2001', '\u2002', '\u2003',
'\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200A',
'\u2028', '\u2029', '\u202F', '\u205F', '\u3000'];
- // <= bugs in pretty-printer?
for chars.iter().advance |c| {
let ws = c.is_whitespace();
println(fmt!("%? %?" , c , ws));
'\u2028', '\u2029', '\u202F', '\u205F', '\u3000'];
for chars.iter().advance |c| {
let ws = c.is_whitespace();
- println(fmt!("%? %?", c , ws)); // <= bugs in pretty-printer?
+ println(fmt!("%? %?", c , ws));
}
}
--- /dev/null
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// pp-exact
+
+fn f(v: &[int]) {
+ let mut n = 0;
+ for v.iter().advance |e| {
+ n = *e; // This comment once triggered pretty printer bug
+ }
+}