Skip to content

Commit 0aa7220

Browse files
committed
---
yaml --- r: 6458 b: refs/heads/master c: 7aee9f7 h: refs/heads/master v: v3
1 parent 74d2b3e commit 0aa7220

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 3e303af86b5380c7d53a8879d883cd36ad2a69a6
2+
refs/heads/master: 7aee9f7b56f8d96f9444ebb1d06e32e024b81974

trunk/src/comp/syntax/parse/parser.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2515,9 +2515,11 @@ fn parse_crate_directives(p: parser, term: token::token,
25152515
}
25162516

25172517
let cdirs: [@ast::crate_directive] = [];
2518+
let first_outer_attr = first_outer_attr;
25182519
while p.peek() != term {
25192520
let cdir = @parse_crate_directive(p, first_outer_attr);
25202521
cdirs += [cdir];
2522+
first_outer_attr = [];
25212523
}
25222524
ret cdirs;
25232525
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Regression test for a problem with the first mod attribute
2+
// being applied to every mod
3+
4+
#[cfg(target_os = "linux")]
5+
mod hello;
6+
7+
#[cfg(target_os = "macos")]
8+
mod hello;
9+
10+
#[cfg(target_os = "win32")]
11+
mod hello;

0 commit comments

Comments
 (0)