Allow extern mods to be anonymous
extern mod { f(); } is now allowed, and puts f in the enclosing scope. (Requires a link_name attribute to be really useful...)
This commit is contained in:
parent
cdcf5a7580
commit
cb8ecd7984
8 changed files with 54 additions and 20 deletions
|
@ -469,7 +469,10 @@ fn print_item(s: ps, &&item: @ast::item) {
|
|||
ast::item_foreign_mod(nmod) => {
|
||||
head(s, ~"extern");
|
||||
word_nbsp(s, ~"mod");
|
||||
print_ident(s, item.ident);
|
||||
match nmod.sort {
|
||||
ast::named => print_ident(s, item.ident),
|
||||
ast::anonymous => {}
|
||||
}
|
||||
nbsp(s);
|
||||
bopen(s);
|
||||
print_foreign_mod(s, nmod, item.attrs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue