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 macro-based deref!() syntax for deref patterns #122793

Merged
merged 2 commits into from Mar 21, 2024

Conversation

compiler-errors
Copy link
Member

Stop using box PAT syntax for deref patterns, and instead use a perma-unstable macro.

Blocked on #122222

r? @Nadrieril

@rustbot rustbot added 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 20, 2024
@rustbot
Copy link
Collaborator

rustbot commented Mar 20, 2024

Some changes occurred in exhaustiveness checking

cc @Nadrieril

Some changes occurred in match lowering

cc @Nadrieril

Some changes occurred in match checking

cc @Nadrieril

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Mar 20, 2024

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@compiler-errors compiler-errors changed the title Implement macro-based deref_pat!() syntax for deref patterns Implement macro-based deref!() syntax for deref patterns Mar 20, 2024
@Nadrieril Nadrieril added the F-deref_patterns `#![feature(deref_patterns)]` label Mar 20, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@fmease
Copy link
Member

fmease commented Mar 21, 2024

Didn't we want to expand built-in macros to builtin # ident going forward?

@compiler-errors
Copy link
Member Author

Oh, yeah, that's easier. I didn't even know about that.

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Mar 21, 2024

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

@rust-log-analyzer

This comment has been minimized.

@Nadrieril
Copy link
Contributor

👍 r=me with the two changes requested by others (when the other PR lands)

Stop using `box PAT` syntax for deref patterns, as it's misleading and
also causes their semantics being tangled up.
@compiler-errors
Copy link
Member Author

Good to go I think

@bors r=Nadrieril

@bors
Copy link
Contributor

bors commented Mar 21, 2024

📌 Commit a4db3ff has been approved by Nadrieril

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 21, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 21, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#122402 (Make `#[diagnostic::on_unimplemented]` format string parsing more robust)
 - rust-lang#122644 (pattern analysis: add a custom test harness)
 - rust-lang#122733 (Strip placeholders from hidden types before remapping generic parameter)
 - rust-lang#122752 (Interpolated cleanups)
 - rust-lang#122771 (add some comments to hir::ModuleItems)
 - rust-lang#122793 (Implement macro-based deref!() syntax for deref patterns)
 - rust-lang#122810 (Remove `target_override`)
 - rust-lang#122827 (Remove unnecessary braces from `bug`/`span_bug`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9cd11c4 into rust-lang:master Mar 21, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Mar 21, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2024
Rollup merge of rust-lang#122793 - compiler-errors:deref-pat-syntax, r=Nadrieril

Implement macro-based deref!() syntax for deref patterns

Stop using `box PAT` syntax for deref patterns, and instead use a perma-unstable macro.

Blocked on rust-lang#122222

r? `@Nadrieril`
@compiler-errors compiler-errors deleted the deref-pat-syntax branch March 22, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-deref_patterns `#![feature(deref_patterns)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

None yet

8 participants