about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/assert
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-05-17 09:49:09 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-05-23 06:03:17 +1000
commitc679a5510222cb861a2a23088d1365707d1e0d6f (patch)
treee9bc88d60d4709cdc60a8c78b2db1b0d15cfa695 /compiler/rustc_builtin_macros/src/assert
parentb6de7821982caf99f58e2925ae3cb78673b31e24 (diff)
downloadrust-c679a5510222cb861a2a23088d1365707d1e0d6f.tar.gz
rust-c679a5510222cb861a2a23088d1365707d1e0d6f.zip
Convert some `token_joint_hidden` calls to `token_joint`.
This has no noticeable effect, but it makes these cases follow the
guidelines in the comments on `Spacing`, which say that `Joint` should
be used "for each token that (a) should be pretty-printed without a
space after it, and (b) is followed by a punctuation token".

These two tokens are both followed by a comma, which is a punctuation
token.
Diffstat (limited to 'compiler/rustc_builtin_macros/src/assert')
-rw-r--r--compiler/rustc_builtin_macros/src/assert/context.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_builtin_macros/src/assert/context.rs b/compiler/rustc_builtin_macros/src/assert/context.rs
index 085ea3458bb..78144226114 100644
--- a/compiler/rustc_builtin_macros/src/assert/context.rs
+++ b/compiler/rustc_builtin_macros/src/assert/context.rs
@@ -153,7 +153,7 @@ impl<'cx, 'a> Context<'cx, 'a> {
     fn build_panic(&self, expr_str: &str, panic_path: Path) -> P<Expr> {
         let escaped_expr_str = escape_to_fmt(expr_str);
         let initial = [
-            TokenTree::token_joint_hidden(
+            TokenTree::token_joint(
                 token::Literal(token::Lit {
                     kind: token::LitKind::Str,
                     symbol: Symbol::intern(&if self.fmt_string.is_empty() {
@@ -172,7 +172,7 @@ impl<'cx, 'a> Context<'cx, 'a> {
         ];
         let captures = self.capture_decls.iter().flat_map(|cap| {
             [
-                TokenTree::token_joint_hidden(
+                TokenTree::token_joint(
                     token::Ident(cap.ident.name, IdentIsRaw::No),
                     cap.ident.span,
                 ),