Remove suffix from MetaItemLit#120705
Conversation
|
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
9883a7c to
5b855ee
Compare
This comment has been minimized.
This comment has been minimized.
5b855ee to
8959eb3
Compare
| StrStyle::Raw(n) => token::StrRaw(n), | ||
| }; | ||
| token::Lit::new(token_kind, self.symbol, self.suffix) | ||
| token::Lit::new(token_kind, self.symbol, None) |
There was a problem hiding this comment.
Whether this can be merged depends on the use of this function an its MetaItemLit equivalent.
Without this change the conversion "token -> ast -> token" was lossless for literals, but now it is lossy.
|
I found a couple usages in rustfmt where unfortunately this may change behavior for a very specific case - formatting hex literals. I tried to verify this with a rustfmt test but Edit: Oh well I'll just commit the test. |
|
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
clippy parses the suffix manually in cases where it's necessary from the literal's span. Not sure if rustfmt can/should do this tho - just the first thing that came to mind if it does change |
|
☔ The latest upstream changes (presumably #121142) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@rustbot author |
It definitely should and has previously in my experience. If you want to confirm locally then doing something like adding a comment within any of the "before" files under |
|
@camsteffen any updates on this? thanks |
|
Ping from triage: I'm closing this due to inactivity, Please reopen when you are ready to continue with this. @rustbot label: +S-inactive |
...as well as
StrLitfor which I believe it is alwaysNone. Otherwise, I believe the only functional change is in ast pretty printing where1_u32may change to1u32.