Skip to content

Conversation

A4-Tacks
Copy link
Contributor

@A4-Tacks A4-Tacks commented Oct 9, 2025

Problems

  • Cannot obtain target type when closure parameters do not match
    - ctx.sema.expr_adjustments(expr): is empty vec
    - ctx.sema.type_of_expr(expr)?.adjusted(): is empty parameters (input closure-expr)

Reference #20775

Example

fn foo() -> impl Fn(i32) {
    ||$0
}

->

fn foo() -> impl Fn(i32) {
    |it| {$0}
}

Example
---
```rust
fn foo() -> impl Fn(i32) {
    ||$0
}
```
->
```rust
fn foo() -> impl Fn(i32) {
    |it| {$0}
}
```
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.

1 participant