rust/library
Yuki Okushi 87c820573a
Rollup merge of #87267 - dtolnay:negspace, r=Aaron1011
Remove space after negative sign in Literal to_string

Negative proc macro literal tokens used to be printed with a space between the minus sign and the magnitude. That's because `impl ToString for Literal` used to convert the Literal into a TokenStream, which splits the minus sign into a separate Punct token.

```rust
Literal::isize_unsuffixed(-10).to_string()  // "- 10"
```

This PR updates the ToString impl to directly use `rustc_ast::token::Lit`'s ToString, which matches the way Rust negative numbers are idiomatically written without a space.

```rust
Literal::isize_unsuffixed(-10).to_string()  // "-10"
```
2021-08-04 08:05:50 +09:00
..
alloc Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
backtrace@221483ebaf Update backtrace to 0.3.57 2021-04-25 13:48:03 -07:00
core Rollup merge of #81797 - yoshuawuyts:stream_from_iter, r=dtolnay 2021-08-04 08:05:50 +09:00
panic_abort Auto merge of #87535 - lf-:authors, r=Mark-Simulacrum 2021-08-02 05:49:17 +00:00
panic_unwind rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
proc_macro Remove space after negative sign in Literal to_string 2021-08-03 10:40:52 -07:00
profiler_builtins rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rtstartup Bump bootstrap compiler to 1.50 beta 2020-12-30 09:27:19 -05:00
rustc-std-workspace-alloc rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc-std-workspace-core rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc-std-workspace-std rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
std Rollup merge of #87708 - the8472:canonical_v6, r=dtolnay 2021-08-03 19:07:48 +09:00
stdarch@3001c75a1d Update stdarch submodule to stabilize simd_x86_bittest feature 2021-06-13 02:29:17 +09:00
test rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
unwind rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00