bazel /
crubit /
2b4182b565bc3405183aee2e9ca48b5b6c5ecb59 Add hardcoded spaces to Rust output.
Normally, we don't need to worry about spaces as `rustfmt` will fix it all for us. Indeed, any added space would get removed/altered by `rustfmt`, so it would normally be pointless.
`__SPACE__` is for the abnornmal case, inside a macro invocation: `rustfmt` will not touch the `...` inside `foo!(...)`. So this change allows one to produce nicely-formatted macro invocations, which would otherwise include only the strictly necessary spacing:
```
forward_declare!(pub foo = bar) --> my_macro!(pub foo=bar)
forward_declare!(pub foo __SPACE__ = __SPACE__ bar) --> my_macro!(pub foo = bar)
```
(In particular, this is exactly the structure used by the forward_declare macro...)
PiperOrigin-RevId: 442817418
2 files changed