rustc: Fix a bug in cdir attribute parsing
The first attribute of the first mod was being applied to every mod.
This commit is contained in:
parent
3e303af86b
commit
7aee9f7b56
2 changed files with 13 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue