Skip to content

Allow Foo { .. } patterns to match non-struct types - #159295

Open
Jules-Bertholet wants to merge 3 commits into
rust-lang:mainfrom
Jules-Bertholet:rfc-3753
Open

Jules-Bertholet wants to merge 3 commits into
rust-lang:mainfrom
Jules-Bertholet:rfc-3753

Conversation

@Jules-Bertholet

@Jules-Bertholet Jules-Bertholet commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Implements rust-lang/rfcs#3753.

r? @ghost

@rustbot label T-lang A-patterns

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 14, 2026
@Jules-Bertholet
Jules-Bertholet force-pushed the rfc-3753 branch 3 times, most recently from 3bf9294 to c2e2353 Compare July 14, 2026 15:44
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added A-patterns Relating to patterns and pattern matching T-lang Relevant to the language team labels Jul 14, 2026
@rustbot

rustbot commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Error: Label needs-rfc can only be set by Rust team members

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip.

@Jules-Bertholet
Jules-Bertholet force-pushed the rfc-3753 branch 3 times, most recently from a92adc3 to fb354ce Compare July 15, 2026 02:15
@Jules-Bertholet

Copy link
Copy Markdown
Contributor Author

This should be ready for at least an initial review—though conditional on t-lang approving the RFC, of course.

r? @Nadrieril

@Jules-Bertholet
Jules-Bertholet marked this pull request as ready for review July 15, 2026 02:17
@rustbot

rustbot commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Nadrieril is currently at their maximum review capacity.
They may take a while to respond.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 15, 2026
@rustbot

rustbot commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in match checking

cc @Nadrieril

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 15, 2026
@theemathas theemathas added the needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. label Jul 15, 2026
@Jules-Bertholet
Jules-Bertholet force-pushed the rfc-3753 branch 2 times, most recently from 54ee721 to 97b2379 Compare July 15, 2026 02:19
Comment thread tests/ui/pattern/non-struct-struct-patterns.rs
@Nadrieril Nadrieril added the needs-rfc This change is large or controversial enough that it should have an RFC accepted before doing it. label Jul 15, 2026
Comment thread compiler/rustc_resolve/src/late.rs
@rust-bors

This comment has been minimized.

@rustbot

rustbot commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #163157) 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-patterns Relating to patterns and pattern matching needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. needs-rfc This change is large or controversial enough that it should have an RFC accepted before doing it. 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-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants