This commit is contained in:
Deadbeef
2025-08-09 13:24:06 +08:00
parent 4c7749e8c8
commit ad1113f87e
93 changed files with 1043 additions and 1056 deletions

View File

@@ -1,7 +1,6 @@
use std::ops::Range;
use parse::Position::ArgumentNamed;
use rustc_ast::ptr::P;
use rustc_ast::tokenstream::TokenStream;
use rustc_ast::{
Expr, ExprKind, FormatAlignment, FormatArgPosition, FormatArgPositionKind, FormatArgs,
@@ -45,7 +44,7 @@ use PositionUsedAs::*;
#[derive(Debug)]
struct MacroInput {
fmtstr: P<Expr>,
fmtstr: Box<Expr>,
args: FormatArguments,
/// Whether the first argument was a string literal or a result from eager macro expansion.
/// If it's not a string literal, we disallow implicit argument capturing.
@@ -1018,7 +1017,7 @@ fn expand_format_args_impl<'cx>(
};
match mac {
Ok(format_args) => {
MacEager::expr(ecx.expr(sp, ExprKind::FormatArgs(P(format_args))))
MacEager::expr(ecx.expr(sp, ExprKind::FormatArgs(Box::new(format_args))))
}
Err(guar) => MacEager::expr(DummyResult::raw_expr(sp, Some(guar))),
}