From: Pierre-Emmanuel Patry Date: Wed, 28 Jun 2023 09:13:15 +0000 (+0200) Subject: gccrs: dump: Fix spacing with dots and references X-Git-Tag: basepoints/gcc-15~2394 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8ce0e28a0114e8a253ab205189f7cb159218a46;p=thirdparty%2Fgcc.git gccrs: dump: Fix spacing with dots and references A space was output around dots as well as after references, this made things kinda horrible to look at and clearly not usual. gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::require_spacing): Add a rule to remove spaces around dots and after references. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index ba8b0badfafd..a1e153ac8941 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -46,6 +46,7 @@ Dump::require_spacing (TokenPtr previous, TokenPtr current) case DOLLAR_SIGN: case SEMICOLON: case COMMA: + case DOT: return false; default: break; @@ -56,6 +57,8 @@ Dump::require_spacing (TokenPtr previous, TokenPtr current) case SCOPE_RESOLUTION: case LEFT_SQUARE: case LEFT_PAREN: + case AMP: + case DOT: return false; default: return true;