-
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
Suggest removing unnecessary prefix let in patterns #101362
Conversation
r? @cjgillot (rust-highfive has picked a reviewer for you, use r? to override) |
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki |
/// Returns `true` if the token can appear at the start of an pattern. | ||
/// | ||
/// Shamelessly borrowed from `can_begin_expr`, only used for diagnostics right now. | ||
pub fn can_begin_pattern(&self) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not confident this is totally accurate, but it's also only used for diagnostics for now...
@bors r+ |
…=cjgillot Suggest removing unnecessary prefix let in patterns Helps with rust-lang#101291, though I think `@estebank` probably wants this: > Finally, I think it'd be nice if we could detect that we don't know for sure and "just" swallow the rest of the expression (find the next ; accounting for nested braces) or the end of the item (easier). ... to be implemented before we close that issue out completely.
☀️ Test successful - checks-actions |
Finished benchmarking commit (a594044): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
Helps with #101291, though I think @estebank probably wants this:
... to be implemented before we close that issue out completely.