Repository navigation
Parser: Clean up parse_expr_dot_or_call_with & simplify parse_expr_prefix - #164537
Conversation
|
r? @camelid rustbot has assigned @camelid. Use Why was this reviewer chosen?The reviewer was selected based on:
|
1d66175 to
b255bbd
Compare
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Parser: Clean up `parse_expr_dot_or_call_with` & simplify `parse_expr_prefix`
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (bf712a5): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary 3.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 490.17s -> 496.821s (1.36%) |
|
(most likely spurious) (I originally issued the perf run since I converted macro calls into function pointer calls) |
This comment has been minimized.
This comment has been minimized.
b255bbd to
e3bd229
Compare
This comment has been minimized.
This comment has been minimized.
|
@rustbot reroll |
|
@fmease feel free to assign parser cleanups to me, in general. (I'm busy on this week specifically, so not self-assigning right now.) |
e3bd229 to
2a5fb21
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
Don't artificially suppress the `.` & `?` expectation after `return` that doesn't make any sense. `return.field` & `return?` are perfectly legal. Moreover, this rather simplistic check didn't even account for any of `return`'s "siblings" (`break`, `continue`, `yield`, `become`, `do yeet`).
2a5fb21 to
b55c02d
Compare
|
Sorry for the delay on this. I actually started reviewing a couple of days ago. I will finish it today. |
| ) -> Option<PResult<'a, Box<Expr>>> { | ||
| if self.may_recover() && self.eat_noexpect(&token::RArrow) { | ||
| self.dcx().emit_err(diagnostics::ExprRArrowCall { span: self.prev_token.span }); | ||
| let base = Box::new(mem::replace(base, Expr::dummy())); |
There was a problem hiding this comment.
This doesn't feel the cleanest but I can't think of a better approach given the need to handle Err cases too...
|
@bors r+ |
…=camelid Parser: Clean up `parse_expr_dot_or_call_with` & simplify `parse_expr_prefix` <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
|
⌛ Testing commit b55c02d with merge 9323d88... Workflow: https://github.com/rust-lang/rust/actions/runs/45248971301 |
Parser: Clean up `parse_expr_dot_or_call_with` & simplify `parse_expr_prefix` <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
|
@bors yield to rollup |
|
Auto build was cancelled. Cancelled workflows: The next pull request likely to be tested is #166415. |
Rollup of 5 pull requests Successful merges: - #164537 (Parser: Clean up `parse_expr_dot_or_call_with` & simplify `parse_expr_prefix`) - #165481 (Separate `Primitive::Bool` and make `#[repr($int)]` enums always use the ABI of $int) - #166290 (Require the next-solver for unsafe binders) - #165865 (Move more rustc lint attributes to lint helpers.) - #166221 (Unstably implement `StaticAllocator` on fundamental types)
Rollup merge of #164537 - fmease:parser-cleanup-prefix-op, r=camelid Parser: Clean up `parse_expr_dot_or_call_with` & simplify `parse_expr_prefix` <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
Rollup of 5 pull requests Successful merges: - rust-lang/rust#164537 (Parser: Clean up `parse_expr_dot_or_call_with` & simplify `parse_expr_prefix`) - rust-lang/rust#165481 (Separate `Primitive::Bool` and make `#[repr($int)]` enums always use the ABI of $int) - rust-lang/rust#166290 (Require the next-solver for unsafe binders) - rust-lang/rust#165865 (Move more rustc lint attributes to lint helpers.) - rust-lang/rust#166221 (Unstably implement `StaticAllocator` on fundamental types)
Rollup of 5 pull requests Successful merges: - rust-lang/rust#164537 (Parser: Clean up `parse_expr_dot_or_call_with` & simplify `parse_expr_prefix`) - rust-lang/rust#165481 (Separate `Primitive::Bool` and make `#[repr($int)]` enums always use the ABI of $int) - rust-lang/rust#166290 (Require the next-solver for unsafe binders) - rust-lang/rust#165865 (Move more rustc lint attributes to lint helpers.) - rust-lang/rust#166221 (Unstably implement `StaticAllocator` on fundamental types)
View all comments
(No LLM was or will be used by me during the entire creation process of this PR)