about summary refs log tree commit diff
path: root/src/libsyntax/parse/mod.rs
diff options
context:
space:
mode:
authorJohn Clements <clements@racket-lang.org>2013-04-30 12:02:56 -0700
committerJohn Clements <clements@racket-lang.org>2013-05-20 11:49:20 -0700
commitb621820dc4727677f14bee0ac5e2fa5e424ed22e (patch)
treec8fe97d98445582ec8d5b5a26670af77a30e0f52 /src/libsyntax/parse/mod.rs
parent05ab83eea80413ef4d7714cae93a30f24e2fff5c (diff)
downloadrust-b621820dc4727677f14bee0ac5e2fa5e424ed22e.tar.gz
rust-b621820dc4727677f14bee0ac5e2fa5e424ed22e.zip
detect unused attrs in one more place, allow parsing to continue for all
changed a bunch of fatal()'s into err()'s, to allow parsing to proceed.
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
-rw-r--r--src/libsyntax/parse/mod.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index f9cf421429c..7aff9f6745c 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -612,4 +612,20 @@ mod test {
         string_to_expr(@~"3 + 4");
         string_to_expr(@~"a::z.froob(b,@(987+3))");
     }
+
+    #[test] fn attrs_fix_bug () {
+        string_to_item(@~"pub fn mk_file_writer(path: &Path, flags: &[FileFlag])
+                   -> Result<@Writer, ~str> {
+    #[cfg(windows)]
+    fn wb() -> c_int {
+      (O_WRONLY | libc::consts::os::extra::O_BINARY) as c_int
+    }
+
+    #[cfg(unix)]
+    fn wb() -> c_int { O_WRONLY as c_int }
+
+    let mut fflags: c_int = wb();
+}");
+    }
+
 }