-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Literal error reporting cleanup #72047
Literal error reporting cleanup #72047
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eddyb (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
r? @petrochenkov |
clippy is currently using a subtree rather than a submodule, so it can be fixed right in this repo. |
Thanks. It didn't work with CLion, but it did with command line git. |
This comment has been minimized.
This comment has been minimized.
to quickly run the unit tests that are currently failing on CI. |
LGTM. |
85856ae
to
8abd741
Compare
Addressed the feedback (and remembered to do |
See #72047 (comment), but I'll r+ in a couple of days anyway because that's not super critical. |
…ods into one method `unescape_literal` with a mode argument.
…o one method `validate_literal_escape` with a mode argument. This enables simplifying the `match` in `cook_lexer_literal()` and it eliminates 90 lines of repetition :)
8abd741
to
43ae785
Compare
Cleaned up the git history and the code for Int and Float isn't moved around anymore. |
Thanks! |
📌 Commit 43ae785 has been approved by |
…reporting_cleanup, r=petrochenkov Literal error reporting cleanup While doing some performance work, I noticed some code duplication in `librustc_parser/lexer/mod.rs`, so I cleaned it up. This PR is probably best reviewed commit by commit. I'm not sure what the API stability practices for `librustc_lexer` are. Four public methods in `unescape.rs` can be removed, but two are used by clippy, so I left them in for now. I could open a PR for Rust-Analyzer when this one lands. But how do I open a PR for clippy? (Git submodules are frustrating to work with)
Rollup of 5 pull requests Successful merges: - rust-lang#72045 (Incomplete features can also be unsound) - rust-lang#72047 (Literal error reporting cleanup) - rust-lang#72060 (move `ty::List` into a new submodule) - rust-lang#72094 (cmdline: Make target features individually overridable) - rust-lang#72254 (Remove redundant backtick in error message.) Failed merges: r? @ghost
…reporting_cleanup, r=petrochenkov Literal error reporting cleanup While doing some performance work, I noticed some code duplication in `librustc_parser/lexer/mod.rs`, so I cleaned it up. This PR is probably best reviewed commit by commit. I'm not sure what the API stability practices for `librustc_lexer` are. Four public methods in `unescape.rs` can be removed, but two are used by clippy, so I left them in for now. I could open a PR for Rust-Analyzer when this one lands. But how do I open a PR for clippy? (Git submodules are frustrating to work with)
4590: Update to rustc_lexer version 660 r=matklad a=Julian-Wollersberger Change the `unescape_*()` functions to `unescape_literal()`, to address the canges I made in rust-lang/rust#72047. I also noticed some outdated FIXMEs. Co-authored-by: Julian Wollersberger <24991778+Julian-Wollersberger@users.noreply.github.com>
While doing some performance work, I noticed some code duplication in
librustc_parser/lexer/mod.rs
, so I cleaned it up.This PR is probably best reviewed commit by commit.
I'm not sure what the API stability practices for
librustc_lexer
are. Four public methods inunescape.rs
can be removed, but two are used by clippy, so I left them in for now.I could open a PR for Rust-Analyzer when this one lands.
But how do I open a PR for clippy? (Git submodules are frustrating to work with)