diff options
| author | John Clements <clements@racket-lang.org> | 2013-04-30 12:02:56 -0700 |
|---|---|---|
| committer | John Clements <clements@racket-lang.org> | 2013-05-20 11:49:20 -0700 |
| commit | b621820dc4727677f14bee0ac5e2fa5e424ed22e (patch) | |
| tree | c8fe97d98445582ec8d5b5a26670af77a30e0f52 /src/libsyntax/parse/mod.rs | |
| parent | 05ab83eea80413ef4d7714cae93a30f24e2fff5c (diff) | |
| download | rust-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.rs | 16 |
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(); +}"); + } + } |
