Skip to content

assist: replace generic with impl trait #14626

Closed
@pickx

Description

@pickx
fn new<P: AsRef<Path>>(location: P) -> Self { }

Placing the cursor on P: AsRef<Path> or on the P of location: P should trigger an assist to change this to

fn new(location: impl AsRef<Path>) -> Self { }

We already have an assist replace impl trait with generic that does the opposite.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions