Rename #mod
-> #module
to not collide with the keyword.
This commit is contained in:
parent
f6ce2bd831
commit
a7125971c6
@ -103,7 +103,7 @@ fn builtin_item_tt(f: syntax_expander_tt_item_) -> syntax_extension {
|
||||
builtin(ext::source_util::expand_include_str));
|
||||
syntax_expanders.insert(~"include_bin",
|
||||
builtin(ext::source_util::expand_include_bin));
|
||||
syntax_expanders.insert(~"mod",
|
||||
syntax_expanders.insert(~"module",
|
||||
builtin(ext::source_util::expand_mod));
|
||||
syntax_expanders.insert(~"proto",
|
||||
builtin_item_tt(ext::pipes::expand_proto));
|
||||
|
@ -162,8 +162,8 @@ fn expand_mod_items(exts: hashmap<~str, syntax_extension>, cx: ext_ctxt,
|
||||
ret {items: new_items with module};
|
||||
}
|
||||
|
||||
// Support for item-position macro invocations, exactly the same
|
||||
// logic as for expression-position macro invocations.
|
||||
|
||||
// When we enter a module, record it, for the sake of `module!`
|
||||
fn expand_item(exts: hashmap<~str, syntax_extension>,
|
||||
cx: ext_ctxt, &&it: @ast::item, fld: ast_fold,
|
||||
orig: fn@(&&@ast::item, ast_fold) -> option<@ast::item>)
|
||||
@ -191,6 +191,9 @@ fn expand_item(exts: hashmap<~str, syntax_extension>,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Support for item-position macro invocations, exactly the same
|
||||
// logic as for expression-position macro invocations.
|
||||
fn expand_item_mac(exts: hashmap<~str, syntax_extension>,
|
||||
cx: ext_ctxt, &&it: @ast::item,
|
||||
fld: ast_fold) -> option<@ast::item> {
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
mod m1 {
|
||||
mod m2 {
|
||||
fn where_am_i() -> ~str { #mod[] }
|
||||
fn where_am_i() -> ~str { #module[] }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user