about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/assert
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2024-02-13 23:28:27 +0000
committerclubby789 <jamie@hill-daniel.co.uk>2024-02-20 13:13:29 +0000
commit06d6c62f80c2729f2ba3129c43c2cd3417b50251 (patch)
treeb52f1a64cb0abd265a2fd5920d309b3c0a9d4498 /compiler/rustc_builtin_macros/src/assert
parentcce6a6e22e715bd74455f2560a956ab920c3a914 (diff)
downloadrust-06d6c62f80c2729f2ba3129c43c2cd3417b50251.tar.gz
rust-06d6c62f80c2729f2ba3129c43c2cd3417b50251.zip
Add newtype for raw idents
Diffstat (limited to 'compiler/rustc_builtin_macros/src/assert')
-rw-r--r--compiler/rustc_builtin_macros/src/assert/context.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_builtin_macros/src/assert/context.rs b/compiler/rustc_builtin_macros/src/assert/context.rs
index d244897f8a5..01821ee833f 100644
--- a/compiler/rustc_builtin_macros/src/assert/context.rs
+++ b/compiler/rustc_builtin_macros/src/assert/context.rs
@@ -1,7 +1,6 @@
 use rustc_ast::{
     ptr::P,
-    token,
-    token::Delimiter,
+    token::{self, Delimiter, IdentIsRaw},
     tokenstream::{DelimSpan, TokenStream, TokenTree},
     BinOpKind, BorrowKind, DelimArgs, Expr, ExprKind, ItemKind, MacCall, MethodCall, Mutability,
     Path, PathSegment, Stmt, StructRest, UnOp, UseTree, UseTreeKind, DUMMY_NODE_ID,
@@ -170,7 +169,10 @@ impl<'cx, 'a> Context<'cx, 'a> {
         ];
         let captures = self.capture_decls.iter().flat_map(|cap| {
             [
-                TokenTree::token_joint_hidden(token::Ident(cap.ident.name, false), cap.ident.span),
+                TokenTree::token_joint_hidden(
+                    token::Ident(cap.ident.name, IdentIsRaw::No),
+                    cap.ident.span,
+                ),
                 TokenTree::token_alone(token::Comma, self.span),
             ]
         });