diff --git a/src/test/compile-fail/issue-3044.rs b/src/test/compile-fail/issue-3044.rs index f4ae436c624d9..310de3657b385 100644 --- a/src/test/compile-fail/issue-3044.rs +++ b/src/test/compile-fail/issue-3044.rs @@ -12,7 +12,7 @@ fn main() { 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. } diff --git a/src/test/pretty/block-comment-wchar.pp b/src/test/pretty/block-comment-wchar.pp index dbf28caecf290..c666950034a01 100644 --- a/src/test/pretty/block-comment-wchar.pp +++ b/src/test/pretty/block-comment-wchar.pp @@ -108,7 +108,6 @@ '\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)); diff --git a/src/test/pretty/block-comment-wchar.rs b/src/test/pretty/block-comment-wchar.rs index 148b50d9c9129..f0d46f39cdf9c 100644 --- a/src/test/pretty/block-comment-wchar.rs +++ b/src/test/pretty/block-comment-wchar.rs @@ -104,6 +104,6 @@ fn main() { '\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)); } } diff --git a/src/test/pretty/for-comment.rs b/src/test/pretty/for-comment.rs new file mode 100644 index 0000000000000..15631337d2a44 --- /dev/null +++ b/src/test/pretty/for-comment.rs @@ -0,0 +1,18 @@ +// 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 or the MIT license +// , 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 + } +}