Skip to content

Commit

Permalink
use consistent naming for buildin expansion functions
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Sep 3, 2019
1 parent fa893a3 commit 6136495
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/libsyntax_ext/concat.rs
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions src/libsyntax_ext/concat_idents.rs
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/libsyntax_ext/lib.rs
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax_ext/log_syntax.rs
Expand Up @@ -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> {
Expand Down

0 comments on commit 6136495

Please sign in to comment.