Skip to content

Raw handle macros for field projection experiments - #164627

Open
dingxiangfei2009 wants to merge 2 commits into
rust-lang:mainfrom
dingxiangfei2009:raw-handle-macros
Open

dingxiangfei2009 wants to merge 2 commits into
rust-lang:mainfrom
dingxiangfei2009:raw-handle-macros

Conversation

@dingxiangfei2009

@dingxiangfei2009 dingxiangfei2009 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🐉 Highly experimental field projection primitive raw_handle!

r? @oli-obk

cc @ShaddyDC
cc @ojeda
cc @BennoLossin

We would like to submit this patch to start the experiment with the LocalHandle and PlaceHandle. We intend to continue polishing it in a patch series following this initial patch.

We know that the following items are not working.

  • Closure capture is still hanging in the air, this will be another major work.
  • Library trait wording. Field projection design in general is still shifting landscape, so many pieces as presented here would change. We will continue submitting patches to match the design.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Oct 20, 2026
@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_ast/src/ast.rs Resolved
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
@oli-obk oli-obk added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. A-repr Area: the `#[repr(stuff)]` attribute and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 9, 2026
@dingxiangfei2009

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@dingxiangfei2009
dingxiangfei2009 marked this pull request as ready for review November 9, 2026 15:23
@rustbot

rustbot commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_ir

cc @jdonszelmann, @JonathanBrouwer

clippy is developed in its own repository. If possible, consider making this change to rust-lang/rust-clippy instead.

cc @rust-lang/clippy

HIR ty lowering was modified

cc @fmease

rustfmt is developed in its own repository. If possible, consider making this change to rust-lang/rustfmt instead.

cc @rust-lang/rustfmt

The parser was modified, potentially altering the grammar of (stable) Rust
which would be a breaking change.

cc @fmease

@BennoLossin

Copy link
Copy Markdown
Contributor

hey @oli-obk it would be great if we could get this merged before the cutoff for 1.102. we have some further additions that we'll want to make, but those can be done in separate PRs. I'd also really like to get to a more incremental dev cycle here.

one note on this PR, Ding and I were in a meeting just now and we noticed that we don't yet have a Deref variant in FieldProjectKind. Ding will add that later today.

@rust-log-analyzer

This comment has been minimized.

@dingxiangfei2009
dingxiangfei2009 force-pushed the raw-handle-macros branch 3 times, most recently from bd6ca0b to aeca9e4 Compare November 10, 2026 14:38
Co-authored-by: Xiangfei Ding <dingxiangfei2009protonmail.ch>
Signed-off-by: Rasmus Piorr <piorr@google.com>
Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
@rust-bors

rust-bors Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #165760) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-repr Area: the `#[repr(stuff)]` attribute S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants