]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: dump: Fix dollar spacing rule
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 28 Jun 2023 11:58:54 +0000 (13:58 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:49:33 +0000 (18:49 +0100)
Space should be removed after the dollar sign, not before.

gcc/rust/ChangeLog:

* ast/rust-ast-dump.cc (Dump::require_spacing): Change dollar
spacing rule.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast-dump.cc

index a1e153ac89419a34d3e6b8bd49e5c988a294ee00..2612c27e772bf7d4b02523c104c26c7a4a4710ba 100644 (file)
@@ -43,7 +43,6 @@ Dump::require_spacing (TokenPtr previous, TokenPtr current)
     case LEFT_SQUARE:
     case RIGHT_SQUARE:
     case RIGHT_PAREN:
-    case DOLLAR_SIGN:
     case SEMICOLON:
     case COMMA:
     case DOT:
@@ -55,6 +54,7 @@ Dump::require_spacing (TokenPtr previous, TokenPtr current)
   switch (previous->get_id ())
     {
     case SCOPE_RESOLUTION:
+    case DOLLAR_SIGN:
     case LEFT_SQUARE:
     case LEFT_PAREN:
     case AMP: