Skip to content

fix: normalize expected tuple struct pat field#22425

Merged
flodiebold merged 1 commit into
rust-lang:masterfrom
A4-Tacks:expected-tuple-normalize-ty
May 23, 2026
Merged

fix: normalize expected tuple struct pat field#22425
flodiebold merged 1 commit into
rust-lang:masterfrom
A4-Tacks:expected-tuple-normalize-ty

Conversation

@A4-Tacks
Copy link
Copy Markdown
Member

@A4-Tacks A4-Tacks commented May 23, 2026

Fixes #22200

Example

struct Foo<T>(T);
fn foo(x: Foo<Option<i32>>) -> Foo {
   match x { Foo($0) => () }
}

Before this PR

ty: T, name: ?

After this PR

ty: Option<i32>, name: ?

Example
---
```rust
struct Foo<T>(T);
fn foo(x: Foo<Option<i32>>) -> Foo {
   match x { Foo($0) => () }
}
```

**Before this PR**

```rust
ty: T, name: ?
```

**After this PR**

```rust
ty: Option<i32>, name: ?
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 23, 2026
@flodiebold flodiebold added this pull request to the merge queue May 23, 2026
Merged via the queue into rust-lang:master with commit 94ea3c8 May 23, 2026
18 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 23, 2026
@A4-Tacks A4-Tacks deleted the expected-tuple-normalize-ty branch May 24, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expected type cannot resolve generic arg

3 participants