-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Do not consider method call receiver as an argument in AST. #100232
Conversation
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
r? @nagisa (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
795e4a7
to
6525bd8
Compare
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
6525bd8
to
b68402a
Compare
This comment has been minimized.
This comment has been minimized.
let hir_seg = self.arena.alloc(self.lower_path_segment( | ||
e.span, | ||
seg, | ||
ParamMode::Optional, | ||
ParenthesizedGenericArgs::Err, | ||
ImplTraitContext::Disallowed(ImplTraitPosition::Path), | ||
)); | ||
let args = self.lower_exprs(args); | ||
let args = self.arena.alloc_from_iter( | ||
[&*receiver].into_iter().chain(args.iter()).map(|x| self.lower_expr_mut(x)), |
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.
Given how much better the AST is from having the receiver be separate, it makes me wonder if HIR would benefit just as much…
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.
This looks great to me. r=me once this passes CI.
2402ca1
to
934d69a
Compare
This comment has been minimized.
This comment has been minimized.
934d69a
to
69205db
Compare
@bors r=nagisa |
Rollup of 11 pull requests Successful merges: - rust-lang#92744 (Check if enum from foreign crate has any non exhaustive variants when attempting a cast) - rust-lang#99110 (Determine match_has_guard from candidates instead of looking up thir table again) - rust-lang#100184 (Stabilize ptr_const_cast) - rust-lang#100192 ( Remove duplicated temporaries creating during box derefs elaboration) - rust-lang#100232 (Do not consider method call receiver as an argument in AST.) - rust-lang#100287 (linux: Use `pthread_setname_np` instead of `prctl`) - rust-lang#100351 (Use `&mut Diagnostic` instead of `&mut DiagnosticBuilder` unless needed) - rust-lang#100370 (Remove more Clean trait implementations) - rust-lang#100391 (Improve size assertions) - rust-lang#100398 (Improve `-Zhir-stats`) - rust-lang#100403 (Improve error messages when running rustdoc GUI tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…ents-in-hir, r=cjgillot Separate the receiver from arguments in HIR Related to rust-lang#100232 cc `@cjgillot`
…ents-in-hir, r=cjgillot Separate the receiver from arguments in HIR Related to rust-lang#100232 cc `@cjgillot`
…s-split, r=pnkfelix Revert "Do not consider method call receiver as an argument in AST." Reverts rust-lang#100232, including a few places where there were merge conflicts after this landed. r? `@pnkfelix` cc `@cjgillot` cc rust-lang#103430 the nightly workaround for this issue.
Fixes #73663