2

Validate that we're only matching on unit struct for path pattern by compiler-er...

 1 month ago
source link: https://github.com/rust-lang/rust/pull/122910
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Conversation

Resolution doesn't validate that we only really take CtorKind::Unit in path patterns, since all it sees is Res::SelfCtor(def_id). Check this instead during pattern typeck.

r? petrochenkov

Fixes #122809

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.

labels

Mar 22, 2024

Contributor

@bors r+

Contributor

📌 Commit 08235b1 has been approved by petrochenkov

It is now in the queue for this repository.

bors

added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

labels

Mar 25, 2024

bors

merged commit e9ec442 into

rust-lang:master

Mar 25, 2024

11 checks passed

rust-timer

added a commit to rust-lang-ci/rust that referenced this pull request

Mar 25, 2024

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

Reviewers

No reviews

Labels
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.
Projects

None yet

Milestone

1.79.0

Development

Successfully merging this pull request may close these issues.

ICE: pattern has unexpected type

4 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK