-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up LitKind
#100018
Clean up LitKind
#100018
Conversation
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
Today I was looking into removing Best reviewed one commit at a time. |
If we are talking about this comment /// FIXME: Remove this and only create the semantic representation during lowering to HIR. then I'm not exactly sure it's a right thing to do, it's more like an invitation to trying and making this experiment. |
Right, and this experiment is what I'm doing. |
The two methods are almost identical.
By using `expr_str` more and adding `expr_{char,byte_str}`.
81cb136
to
bf67ef1
Compare
This comment has been minimized.
This comment has been minimized.
- Rename `ast::Lit::token` as `ast::Lit::token_lit`, because its type is `token::Lit`, which is not a token. (This has been confusing me for a long time.) reasonable because we have an `ast::token::Lit` inside an `ast::Lit`. - Rename `LitKind::{from,to}_lit_token` as `LitKind::{from,to}_token_lit`, to match the above change and `token::Lit`.
bf67ef1
to
5d3cc17
Compare
@bors r+ |
…trochenkov Clean up `LitKind` r? `@petrochenkov`
@bors rollup=always |
…trochenkov Clean up `LitKind` r? `@petrochenkov`
…iaskrgr Rollup of 15 pull requests Successful merges: - rust-lang#99474 (Rustdoc json tests: New `@hasexact` test command) - rust-lang#99972 (interpret: only consider 1-ZST when searching for receiver) - rust-lang#100018 (Clean up `LitKind`) - rust-lang#100379 (triagebot: add translation-related mention groups) - rust-lang#100389 (Do not report cycle error when inferring return type for suggestion) - rust-lang#100489 (`is_knowable` use `Result` instead of `Option`) - rust-lang#100532 (unwind: don't build dependency when building for Miri) - rust-lang#100608 (needless separation of impl blocks) - rust-lang#100621 (Pass +atomics-32 feature for {arm,thumb}v4t-none-eabi) - rust-lang#100646 (Migrate emoji identifier diagnostics to `SessionDiagnostic` in rustc_interface) - rust-lang#100652 (Remove deferred sized checks (make them eager)) - rust-lang#100655 (Update books) - rust-lang#100656 (Update cargo) - rust-lang#100660 (Fixed a few documentation errors) - rust-lang#100661 (Fixed a few documentation errors) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…trochenkov Clean up `LitKind` r? ``@petrochenkov``
…trochenkov Clean up `LitKind` r? ``@petrochenkov``
r? @petrochenkov