mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
87c820573a
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" ``` |
||
---|---|---|
.. | ||
alloc | ||
backtrace@221483ebaf | ||
core | ||
panic_abort | ||
panic_unwind | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@3001c75a1d | ||
test | ||
unwind |