Skip to content

Commit fc41c38

Browse files
committed
mbe: Factor out a function to transcribe a ParseNtResult
1 parent bb430f8 commit fc41c38

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

compiler/rustc_expand/src/mbe/transcribe.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,14 @@ fn transcribe_metavar<'tx>(
380380
return Err(dcx.create_err(MacroVarStillRepeating { span: sp, ident }));
381381
};
382382

383+
transcribe_pnr(tscx, sp, pnr)
384+
}
385+
386+
fn transcribe_pnr<'tx>(
387+
tscx: &mut TranscrCtx<'tx, '_>,
388+
mut sp: Span,
389+
pnr: &ParseNtResult,
390+
) -> PResult<'tx, ()> {
383391
// We wrap the tokens in invisible delimiters, unless they are already wrapped
384392
// in invisible delimiters with the same `MetaVarKind`. Because some proc
385393
// macros can't handle multiple layers of invisible delimiters of the same

0 commit comments

Comments
 (0)