Skip to content

Cannot solve method call of &Iterator::Item #20548

@A4-Tacks

Description

@A4-Tacks

rust-analyzer version: rust-analyzer 0.4.2595-standalone

rustc version: rustc 1.91.0-nightly (040a98af7 2025-08-20)

editor or extension: VIM

code snippet to reproduce:

fn main() {
    (0i32..5i32).partition::<Vec<_>, _>(|n| {
        let _x = n.checked_add(3);
        true
    });
}

Hover in _x output:

let _x: {unknown}
──────────────────────────────────────────────────────────────────────────────
Implements notable traits: Future<Output = ?>, Iterator<Item = ?>, Read, Write
──────────────────────────────────────────────────────────────────────────────
no Drop

Metadata

Metadata

Labels

A-new-solverBugs from the new solver migration - should be fixed before stable releaseA-tytype system / type inference / traits / method resolutionC-bugCategory: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions