Improve name and documentation of generic_extension
This function doesn't *create* a (rules based) macro, it *expands* it. Thus, the documentation was wrong.
This commit is contained in:
parent
c6499fd998
commit
cc3c5d2700
1 changed files with 4 additions and 3 deletions
|
@ -175,7 +175,7 @@ impl TTMacroExpander for MacroRulesMacroExpander {
|
||||||
if !self.valid {
|
if !self.valid {
|
||||||
return DummyResult::any(sp);
|
return DummyResult::any(sp);
|
||||||
}
|
}
|
||||||
generic_extension(
|
expand_macro(
|
||||||
cx,
|
cx,
|
||||||
sp,
|
sp,
|
||||||
self.span,
|
self.span,
|
||||||
|
@ -202,8 +202,9 @@ fn trace_macros_note(cx_expansions: &mut FxHashMap<Span, Vec<String>>, sp: Span,
|
||||||
cx_expansions.entry(sp).or_default().push(message);
|
cx_expansions.entry(sp).or_default().push(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Given `lhses` and `rhses`, this is the new macro we create
|
/// Expands the rules based macro defined by `lhses` and `rhses` for a given
|
||||||
fn generic_extension<'cx, 'tt>(
|
/// input `arg`.
|
||||||
|
fn expand_macro<'cx, 'tt>(
|
||||||
cx: &'cx mut ExtCtxt<'_>,
|
cx: &'cx mut ExtCtxt<'_>,
|
||||||
sp: Span,
|
sp: Span,
|
||||||
def_span: Span,
|
def_span: Span,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue