about summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-11-24 16:17:26 -0800
committerBrian Anderson <banderson@mozilla.com>2011-11-24 16:18:26 -0800
commit7aee9f7b56f8d96f9444ebb1d06e32e024b81974 (patch)
tree66ce836ff65e1a3c8ecc3d7d8bd161ca14e24ac0 /src/comp/syntax
parent3e303af86b5380c7d53a8879d883cd36ad2a69a6 (diff)
downloadrust-7aee9f7b56f8d96f9444ebb1d06e32e024b81974.tar.gz
rust-7aee9f7b56f8d96f9444ebb1d06e32e024b81974.zip
rustc: Fix a bug in cdir attribute parsing
The first attribute of the first mod was being applied to every mod.
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/parse/parser.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 82c477a7d96..a8f294820af 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -2515,9 +2515,11 @@ fn parse_crate_directives(p: parser, term: token::token,
     }
 
     let cdirs: [@ast::crate_directive] = [];
+    let first_outer_attr = first_outer_attr;
     while p.peek() != term {
         let cdir = @parse_crate_directive(p, first_outer_attr);
         cdirs += [cdir];
+        first_outer_attr = [];
     }
     ret cdirs;
 }