aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'crates/assists/src/handlers')
-rw-r--r--crates/assists/src/handlers/add_missing_impl_members.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/crates/assists/src/handlers/add_missing_impl_members.rs b/crates/assists/src/handlers/add_missing_impl_members.rs
index e413505d3..7df05b841 100644
--- a/crates/assists/src/handlers/add_missing_impl_members.rs
+++ b/crates/assists/src/handlers/add_missing_impl_members.rs
@@ -15,7 +15,7 @@ use crate::{
15// 15//
16// ``` 16// ```
17// trait Trait<T> { 17// trait Trait<T> {
18// Type X; 18// type X;
19// fn foo(&self) -> T; 19// fn foo(&self) -> T;
20// fn bar(&self) {} 20// fn bar(&self) {}
21// } 21// }
@@ -27,14 +27,16 @@ use crate::{
27// -> 27// ->
28// ``` 28// ```
29// trait Trait<T> { 29// trait Trait<T> {
30// Type X; 30// type X;
31// fn foo(&self) -> T; 31// fn foo(&self) -> T;
32// fn bar(&self) {} 32// fn bar(&self) {}
33// } 33// }
34// 34//
35// impl Trait<u32> for () { 35// impl Trait<u32> for () {
36// $0type X;
37//
36// fn foo(&self) -> u32 { 38// fn foo(&self) -> u32 {
37// ${0:todo!()} 39// todo!()
38// } 40// }
39// } 41// }
40// ``` 42// ```
@@ -54,13 +56,13 @@ pub(crate) fn add_missing_impl_members(acc: &mut Assists, ctx: &AssistContext) -
54// 56//
55// ``` 57// ```
56// trait Trait { 58// trait Trait {
57// Type X; 59// type X;
58// fn foo(&self); 60// fn foo(&self);
59// fn bar(&self) {} 61// fn bar(&self) {}
60// } 62// }
61// 63//
62// impl Trait for () { 64// impl Trait for () {
63// Type X = (); 65// type X = ();
64// fn foo(&self) {}<|> 66// fn foo(&self) {}<|>
65// 67//
66// } 68// }
@@ -68,13 +70,13 @@ pub(crate) fn add_missing_impl_members(acc: &mut Assists, ctx: &AssistContext) -
68// -> 70// ->
69// ``` 71// ```
70// trait Trait { 72// trait Trait {
71// Type X; 73// type X;
72// fn foo(&self); 74// fn foo(&self);
73// fn bar(&self) {} 75// fn bar(&self) {}
74// } 76// }
75// 77//
76// impl Trait for () { 78// impl Trait for () {
77// Type X = (); 79// type X = ();
78// fn foo(&self) {} 80// fn foo(&self) {}
79// 81//
80// $0fn bar(&self) {} 82// $0fn bar(&self) {}