diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-09 17:23:03 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-09 17:23:03 +0100 |
commit | 2fe329db48a7f078c8bb960d4e3ce967ab3990f5 (patch) | |
tree | 24ef111ade85a182e36ebe0265c15225eb2cb238 /crates/ide_assists/src/handlers/replace_impl_trait_with_generic.rs | |
parent | a3b034938ebe12b29ef37ff6e54bad3c574464be (diff) | |
parent | 680a0d54e4d2d474ae41f4f4a95c749495a02883 (diff) |
Merge #8782
8782: internal: fix make API r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide_assists/src/handlers/replace_impl_trait_with_generic.rs')
-rw-r--r-- | crates/ide_assists/src/handlers/replace_impl_trait_with_generic.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide_assists/src/handlers/replace_impl_trait_with_generic.rs b/crates/ide_assists/src/handlers/replace_impl_trait_with_generic.rs index 16cae0281..15420aedf 100644 --- a/crates/ide_assists/src/handlers/replace_impl_trait_with_generic.rs +++ b/crates/ide_assists/src/handlers/replace_impl_trait_with_generic.rs | |||
@@ -37,12 +37,12 @@ pub(crate) fn replace_impl_trait_with_generic( | |||
37 | 37 | ||
38 | let type_param_name = suggest_name::for_generic_parameter(&impl_trait_type); | 38 | let type_param_name = suggest_name::for_generic_parameter(&impl_trait_type); |
39 | 39 | ||
40 | let type_param = | 40 | let type_param = make::type_param(make::name(&type_param_name), Some(type_bound_list)) |
41 | make::generic_param(&type_param_name, Some(type_bound_list)).clone_for_update(); | 41 | .clone_for_update(); |
42 | let new_ty = make::ty(&type_param_name).clone_for_update(); | 42 | let new_ty = make::ty(&type_param_name).clone_for_update(); |
43 | 43 | ||
44 | ted::replace(impl_trait_type.syntax(), new_ty.syntax()); | 44 | ted::replace(impl_trait_type.syntax(), new_ty.syntax()); |
45 | fn_.get_or_create_generic_param_list().add_generic_param(type_param) | 45 | fn_.get_or_create_generic_param_list().add_generic_param(type_param.into()) |
46 | }, | 46 | }, |
47 | ) | 47 | ) |
48 | } | 48 | } |