diff options
Diffstat (limited to 'crates/assists/src/utils.rs')
-rw-r--r-- | crates/assists/src/utils.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/assists/src/utils.rs b/crates/assists/src/utils.rs index 8418e6e12..0074da741 100644 --- a/crates/assists/src/utils.rs +++ b/crates/assists/src/utils.rs | |||
@@ -421,7 +421,14 @@ fn generate_impl_text_inner(adt: &ast::Adt, trait_text: Option<&str>, code: &str | |||
421 | format_to!(buf, "<{}>", lifetime_params.chain(type_params).format(", ")) | 421 | format_to!(buf, "<{}>", lifetime_params.chain(type_params).format(", ")) |
422 | } | 422 | } |
423 | 423 | ||
424 | format_to!(buf, " {{\n{}\n}}", code); | 424 | match adt.where_clause() { |
425 | Some(where_clause) => { | ||
426 | format_to!(buf, "\n{}\n{{\n{}\n}}", where_clause, code); | ||
427 | } | ||
428 | None => { | ||
429 | format_to!(buf, " {{\n{}\n}}", code); | ||
430 | } | ||
431 | } | ||
425 | 432 | ||
426 | buf | 433 | buf |
427 | } | 434 | } |