From 733e87d08f9073aff67573ac236a0e0908279054 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 6 Jan 2024 12:32:34 +0800 Subject: [PATCH] Expand - Tweak format_args for 1.74 --- src/expand/format_args.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/expand/format_args.cpp b/src/expand/format_args.cpp index bd96b2d7..364c94da 100644 --- a/src/expand/format_args.cpp +++ b/src/expand/format_args.cpp @@ -881,6 +881,13 @@ namespace { toks.push_back( TokenTree(TOK_SQUARE_CLOSE) ); } // ) + if( TARGETVER_LEAST_1_74 ) { + toks.push_back(TokenTree(TOK_COMMA)); + // TODO: This is a lang item - `format_unsafe_arg` + push_path(toks, crate, {"fmt", "rt", "UnsafeArg", "new"}); + toks.push_back( TokenTree(TOK_PAREN_OPEN) ); + toks.push_back( TokenTree(TOK_PAREN_CLOSE) ); + } toks.push_back( TokenTree(TOK_PAREN_CLOSE) ); } // if(is_simple) else