]> git.lizzy.rs Git - rust.git/commitdiff
Fix fallout from span change
authorSeo Sanghyeon <sanxiyn@gmail.com>
Fri, 5 Jul 2013 05:56:54 +0000 (14:56 +0900)
committerSeo Sanghyeon <sanxiyn@gmail.com>
Fri, 5 Jul 2013 05:56:54 +0000 (14:56 +0900)
src/test/compile-fail/issue-3044.rs
src/test/pretty/block-comment-wchar.pp
src/test/pretty/block-comment-wchar.rs
src/test/pretty/for-comment.rs [new file with mode: 0644]

index f4ae436c624d9caeaa9241fe933726c7fa055b9a..310de3657b385e06bc2b7177cd20c85aa7d3d8a2 100644 (file)
@@ -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.
 }
index dbf28caecf290dfc4a5ab2c70d63153582403285..c666950034a01072075b9b54b02612d2fd4ad4cb 100644 (file)
@@ -108,7 +108,6 @@ fn main() {
          '\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));
index 148b50d9c9129a4bef628806dde998058bebae7d..f0d46f39cdf9cba980bed076165c9fcf9df21fb9 100644 (file)
@@ -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 (file)
index 0000000..1563133
--- /dev/null
@@ -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 <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
+    }
+}