diff options
| author | bors <bors@rust-lang.org> | 2023-05-26 12:03:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-26 12:03:44 +0000 |
| commit | e9638466567e66f6024ffa922bf48b8aba6a33b4 (patch) | |
| tree | 611313edd9c3687daf253ffaad4283a3ce5a4e61 /tests/rustdoc-js-std/parser-errors.js | |
| parent | 8589a2d843487081530d49100927e385d80cb836 (diff) | |
| parent | e78df83e2fb89b475187f7d4b631a68619b590b5 (diff) | |
| download | rust-e9638466567e66f6024ffa922bf48b8aba6a33b4.tar.gz rust-e9638466567e66f6024ffa922bf48b8aba6a33b4.zip | |
Auto merge of #14816 - justahero:gh-14626, r=Veykril
feat: Assist to replace generic with impl trait
This adds a new assist named "Replace named generic with impl". It is the inverse operation to the existing "Replace impl trait with generic" assist.
It allows to refactor the following statement:
```rust
// 👇 cursor
fn new<T$0: ToString>(input: T) -> Self {}
```
to be transformed into:
```rust
fn new(input: impl ToString) -> Self {}
```
* adds new helper function `impl_trait_type` to create AST node
* add method to remove an existing generic param type from param list
Closes #14626
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions
