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:
@@ -554,7 +554,8 @@ fn noop_fold_mod(m: _mod, fld: ast_fold) -> _mod {
|
||||
}
|
||||
|
||||
fn noop_fold_foreign_mod(nm: foreign_mod, fld: ast_fold) -> foreign_mod {
|
||||
return {view_items: vec::map(nm.view_items, |x| fld.fold_view_item(x)),
|
||||
return {sort: nm.sort,
|
||||
view_items: vec::map(nm.view_items, |x| fld.fold_view_item(x)),
|
||||
items: vec::map(nm.items, |x| fld.fold_foreign_item(x))}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user