diff options
| author | Marijn Schouten <mhkbst@gmail.com> | 2025-01-23 10:16:08 +0100 | 
|---|---|---|
| committer | Marijn Schouten <mhkbst@gmail.com> | 2025-01-28 19:33:00 +0100 | 
| commit | 3026545ab50e65fcd1c888b77272032000e36147 (patch) | |
| tree | 83d8f76cf48fb5dff5b2e1bf6de953a0c639be24 /compiler/rustc_builtin_macros/src | |
| parent | fdd1a3b02687817cea41f6bacae3d5fbed2b2cd0 (diff) | |
| download | rust-3026545ab50e65fcd1c888b77272032000e36147.tar.gz rust-3026545ab50e65fcd1c888b77272032000e36147.zip | |
parse_format optimize import use
Diffstat (limited to 'compiler/rustc_builtin_macros/src')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/asm.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_builtin_macros/src/format.rs | 2 | 
2 files changed, 2 insertions, 2 deletions
| diff --git a/compiler/rustc_builtin_macros/src/asm.rs b/compiler/rustc_builtin_macros/src/asm.rs index 5062cf55bb9..eb5b345e49e 100644 --- a/compiler/rustc_builtin_macros/src/asm.rs +++ b/compiler/rustc_builtin_macros/src/asm.rs @@ -651,7 +651,7 @@ fn expand_preparsed_asm( .map(|span| template_span.from_inner(InnerSpan::new(span.start, span.end))); for piece in unverified_pieces { match piece { - parse::Piece::String(s) => { + parse::Piece::Lit(s) => { template.push(ast::InlineAsmTemplatePiece::String(s.to_string().into())) } parse::Piece::NextArgument(arg) => { diff --git a/compiler/rustc_builtin_macros/src/format.rs b/compiler/rustc_builtin_macros/src/format.rs index 5202fe26c40..a0ab6375a66 100644 --- a/compiler/rustc_builtin_macros/src/format.rs +++ b/compiler/rustc_builtin_macros/src/format.rs @@ -406,7 +406,7 @@ fn make_format_args( for piece in &pieces { match *piece { - parse::Piece::String(s) => { + parse::Piece::Lit(s) => { unfinished_literal.push_str(s); } parse::Piece::NextArgument(box parse::Argument { position, position_span, format }) => { | 
