diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-29 10:56:10 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-29 10:56:10 +0000 |
commit | b53ff214aa9fe30eeedb64f78cc89561060c0083 (patch) | |
tree | f78e3650b3cd4ca1f13a7fdc90b9f4f60e0c6ce0 /crates/ra_assists/src/handlers/move_bounds.rs | |
parent | 7cf710c66f5645193a765ededfed77eaec9a19a9 (diff) | |
parent | ca713e462b90afd650a5c07014e066d0aa4dbd69 (diff) |
Merge #3374
3374: More orthogonal API for building paths r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/handlers/move_bounds.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/move_bounds.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_assists/src/handlers/move_bounds.rs b/crates/ra_assists/src/handlers/move_bounds.rs index 90793b5fc..616b95770 100644 --- a/crates/ra_assists/src/handlers/move_bounds.rs +++ b/crates/ra_assists/src/handlers/move_bounds.rs | |||
@@ -72,7 +72,11 @@ pub(crate) fn move_bounds_to_where_clause(ctx: AssistCtx) -> Option<Assist> { | |||
72 | } | 72 | } |
73 | 73 | ||
74 | fn build_predicate(param: ast::TypeParam) -> Option<ast::WherePred> { | 74 | fn build_predicate(param: ast::TypeParam) -> Option<ast::WherePred> { |
75 | let path = make::path_from_name_ref(make::name_ref(¶m.name()?.syntax().to_string())); | 75 | let path = { |
76 | let name_ref = make::name_ref(¶m.name()?.syntax().to_string()); | ||
77 | let segment = make::path_segment(name_ref); | ||
78 | make::path_unqalified(segment) | ||
79 | }; | ||
76 | let predicate = make::where_pred(path, param.type_bound_list()?.bounds()); | 80 | let predicate = make::where_pred(path, param.type_bound_list()?.bounds()); |
77 | Some(predicate) | 81 | Some(predicate) |
78 | } | 82 | } |