Skip to content
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

Implement pin!() using super let #139114

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Mar 29, 2025

Tracking issue for super let: #139076

This uses super let to implement pin!().

This means we can remove the hack we had to put in to fix #138596.

It also means we can remove the original hack to make pin!() work, which used a questionable public-but-unstable field rather than a proper private field.

While super let is still unstable and subject to change, it seems safe to assume that future Rust will always have a way to express pin!() in a compatible way, considering pin!() is already stable.

It'd help the experiment to have pin!() use super let, so we can get some more experience with it.

@m-ou-se m-ou-se self-assigned this Mar 29, 2025
@rustbot rustbot added PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels Mar 29, 2025
@m-ou-se m-ou-se mentioned this pull request Mar 29, 2025
25 tasks
@m-ou-se m-ou-se removed the PG-exploit-mitigations Project group: Exploit mitigations label Mar 29, 2025
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the PG-exploit-mitigations Project group: Exploit mitigations label Mar 29, 2025
@m-ou-se m-ou-se removed the PG-exploit-mitigations Project group: Exploit mitigations label Mar 29, 2025
@rustbot rustbot added the PG-exploit-mitigations Project group: Exploit mitigations label Mar 30, 2025
@m-ou-se m-ou-se removed the PG-exploit-mitigations Project group: Exploit mitigations label Mar 30, 2025
@bors
Copy link
Collaborator

bors commented Apr 1, 2025

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

@rustbot rustbot added the PG-exploit-mitigations Project group: Exploit mitigations label Apr 9, 2025
@m-ou-se m-ou-se removed the PG-exploit-mitigations Project group: Exploit mitigations label Apr 9, 2025
@m-ou-se m-ou-se marked this pull request as ready for review April 9, 2025 13:08
@rustbot
Copy link
Collaborator

rustbot commented Apr 9, 2025

Some changes occurred in tests/ui/sanitizer

cc @rcvalle

@m-ou-se
Copy link
Member Author

m-ou-se commented Apr 9, 2025

r? compiler

@rustbot rustbot assigned davidtwco and unassigned m-ou-se Apr 9, 2025
@bors
Copy link
Collaborator

bors commented Apr 10, 2025

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

@rustbot rustbot added the PG-exploit-mitigations Project group: Exploit mitigations label Apr 10, 2025
@m-ou-se m-ou-se removed the PG-exploit-mitigations Project group: Exploit mitigations label Apr 10, 2025
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the PG-exploit-mitigations Project group: Exploit mitigations label Apr 10, 2025
@m-ou-se m-ou-se removed the PG-exploit-mitigations Project group: Exploit mitigations label Apr 10, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 10, 2025
Remove unnecessary `mut` in test.

The value is moved in `pin!()`, so the binding doesn't need to be `mut` itself.

(Rustc doesn't warn about this due to the current hacky implementation of `pin!()`. That is fixed by rust-lang#139114.)
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 10, 2025
Rollup merge of rust-lang#139626 - m-ou-se:mut, r=lqd

Remove unnecessary `mut` in test.

The value is moved in `pin!()`, so the binding doesn't need to be `mut` itself.

(Rustc doesn't warn about this due to the current hacky implementation of `pin!()`. That is fixed by rust-lang#139114.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pin macro no longer lifetime extends argument
6 participants