Skip to content

Add generic bounds assist #11520

Open
Open
@JMS55

Description

@JMS55
pub fn read_perf_data<P>(path: P) -> Result<(), Box<dyn Error>> {
    let mut file = File::open(path)?;
}

The compiler knows that path does not satisfy the bounds for File::open. Having an assist to add the needed bounds to P would be great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-assistsA-tytype system / type inference / traits / method resolutionC-featureCategory: feature requestE-medium

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions