use consistent naming for buildin expansion functions

This commit is contained in:
Aleksey Kladov 2019-09-03 17:43:25 +03:00
parent fa893a3225
commit 613649584a
4 changed files with 9 additions and 9 deletions

View File

@ -5,7 +5,7 @@ use syntax::tokenstream::TokenStream;
use std::string::String;
pub fn expand_syntax_ext(
pub fn expand_concat(
cx: &mut base::ExtCtxt<'_>,
sp: syntax_pos::Span,
tts: TokenStream,

View File

@ -8,10 +8,10 @@ use syntax_pos::Span;
use syntax_pos::symbol::Symbol;
use syntax::tokenstream::{TokenTree, TokenStream};
pub fn expand_syntax_ext<'cx>(cx: &'cx mut ExtCtxt<'_>,
sp: Span,
tts: TokenStream)
-> Box<dyn base::MacResult + 'cx> {
pub fn expand_concat_idents<'cx>(cx: &'cx mut ExtCtxt<'_>,
sp: Span,
tts: TokenStream)
-> Box<dyn base::MacResult + 'cx> {
if tts.is_empty() {
cx.span_err(sp, "concat_idents! takes 1 or more arguments.");
return DummyResult::any(sp);

View File

@ -67,8 +67,8 @@ pub fn register_builtin_macros(resolver: &mut dyn syntax::ext::base::Resolver, e
cfg: cfg::expand_cfg,
column: source_util::expand_column,
compile_error: compile_error::expand_compile_error,
concat_idents: concat_idents::expand_syntax_ext,
concat: concat::expand_syntax_ext,
concat_idents: concat_idents::expand_concat_idents,
concat: concat::expand_concat,
env: env::expand_env,
file: source_util::expand_file,
format_args_nl: format::expand_format_args_nl,
@ -78,7 +78,7 @@ pub fn register_builtin_macros(resolver: &mut dyn syntax::ext::base::Resolver, e
include_str: source_util::expand_include_str,
include: source_util::expand_include,
line: source_util::expand_line,
log_syntax: log_syntax::expand_syntax_ext,
log_syntax: log_syntax::expand_log_syntax,
module_path: source_util::expand_mod,
option_env: env::expand_option_env,
stringify: source_util::expand_stringify,

View File

@ -3,7 +3,7 @@ use syntax::print;
use syntax::tokenstream::TokenStream;
use syntax_pos;
pub fn expand_syntax_ext<'cx>(_cx: &'cx mut base::ExtCtxt<'_>,
pub fn expand_log_syntax<'cx>(_cx: &'cx mut base::ExtCtxt<'_>,
sp: syntax_pos::Span,
tts: TokenStream)
-> Box<dyn base::MacResult + 'cx> {