-
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
Delegation: support coercion for target expression #126699
Conversation
@rustbot author |
de488f2
to
1e5a473
Compare
@rustbot ready |
The PR needs a high level description - how exactly does it solve #118212 (comment) (in a few sentences). |
…ctoring, r=petrochenkov Delegation: ast lowering refactor refactoring changes for rust-lang#126699 r? `@petrochenkov`
…ctoring, r=petrochenkov Delegation: ast lowering refactor refactoring changes for rust-lang#126699 r? ``@petrochenkov``
…ctoring, r=petrochenkov Delegation: ast lowering refactor refactoring changes for rust-lang#126699 r? ```@petrochenkov```
Rollup merge of rust-lang#126947 - Bryanskiy:delegation-lowering-refactoring, r=petrochenkov Delegation: ast lowering refactor refactoring changes for rust-lang#126699 r? ```@petrochenkov```
This comment was marked as resolved.
This comment was marked as resolved.
1e5a473
to
64d78b4
Compare
@rustbot ready |
64d78b4
to
02a1f30
Compare
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.
See comments.
9568e12
to
784f358
Compare
@rustbot ready |
r=me after the nit |
784f358
to
7ee97f9
Compare
@bors r=compiler-errors |
@Bryanskiy: 🔑 Insufficient privileges: Not in reviewers |
@bors r=compiler-errors,petrochenkov |
@bors r=compiler-errors |
lol race condition |
Rollup of 7 pull requests Successful merges: - rust-lang#124033 (Sync ar_archive_writer to LLVM 18.1.3) - rust-lang#126699 (Delegation: support coercion for target expression) - rust-lang#126762 (Deny keyword lifetimes pre-expansion) - rust-lang#126967 (Promote the `wasm32-wasip2` target to Tier 2) - rust-lang#127390 (Migrate `raw-dylib-inline-cross-dylib` and `raw-dylib-custom-dlltool` `run-make` tests to rmake) - rust-lang#127501 (Invert infer `error_reporting` mod struture) - rust-lang#127816 (Update method name to reflect changes to its internals) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#126699 - Bryanskiy:delegation-coercion, r=compiler-errors Delegation: support coercion for target expression (solves rust-lang#118212 (comment)) The implementation consist of 2 parts. Firstly, method call is generated instead of fully qualified call in AST->HIR lowering if there were no generic arguments or `Qpath` were provided. These restrictions are imposed due to the loss of information after desugaring. For example in ```rust trait Trait { fn foo(&self) {} } reuse <u8 as Trait>::foo; ``` We would like to generate such a code: ```rust fn foo<u8: Trait>(x: &u8) { x.foo(x) } ``` however, the signature is inherited during HIR analysis where `u8` was discarded. Then, we probe the single pre-resolved method. P.S In the future, we would like to avoid restrictions on the callee path by `Self` autoref/autoderef in fully qualified calls, but at the moment it didn't work out. r? `@petrochenkov`
Thanks for taking over this and sorry for not being able to look at this on time. |
(solves #118212 (comment))
The implementation consist of 2 parts. Firstly, method call is generated instead of fully qualified call in AST->HIR lowering if there were no generic arguments or
Qpath
were provided. These restrictions are imposed due to the loss of information after desugaring. For example inWe would like to generate such a code:
however, the signature is inherited during HIR analysis where
u8
was discarded.Then, we probe the single pre-resolved method.
P.S In the future, we would like to avoid restrictions on the callee path by
Self
autoref/autoderef in fully qualified calls, but at the moment it didn't work out.r? @petrochenkov