diff options
Diffstat (limited to 'crates/assists/src/handlers/generate_derive.rs')
-rw-r--r-- | crates/assists/src/handlers/generate_derive.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/assists/src/handlers/generate_derive.rs b/crates/assists/src/handlers/generate_derive.rs index 314504e15..f876b7684 100644 --- a/crates/assists/src/handlers/generate_derive.rs +++ b/crates/assists/src/handlers/generate_derive.rs | |||
@@ -13,7 +13,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists}; | |||
13 | // ``` | 13 | // ``` |
14 | // struct Point { | 14 | // struct Point { |
15 | // x: u32, | 15 | // x: u32, |
16 | // y: u32,<|> | 16 | // y: u32,$0 |
17 | // } | 17 | // } |
18 | // ``` | 18 | // ``` |
19 | // -> | 19 | // -> |
@@ -76,12 +76,12 @@ mod tests { | |||
76 | fn add_derive_new() { | 76 | fn add_derive_new() { |
77 | check_assist( | 77 | check_assist( |
78 | generate_derive, | 78 | generate_derive, |
79 | "struct Foo { a: i32, <|>}", | 79 | "struct Foo { a: i32, $0}", |
80 | "#[derive($0)]\nstruct Foo { a: i32, }", | 80 | "#[derive($0)]\nstruct Foo { a: i32, }", |
81 | ); | 81 | ); |
82 | check_assist( | 82 | check_assist( |
83 | generate_derive, | 83 | generate_derive, |
84 | "struct Foo { <|> a: i32, }", | 84 | "struct Foo { $0 a: i32, }", |
85 | "#[derive($0)]\nstruct Foo { a: i32, }", | 85 | "#[derive($0)]\nstruct Foo { a: i32, }", |
86 | ); | 86 | ); |
87 | } | 87 | } |
@@ -90,7 +90,7 @@ mod tests { | |||
90 | fn add_derive_existing() { | 90 | fn add_derive_existing() { |
91 | check_assist( | 91 | check_assist( |
92 | generate_derive, | 92 | generate_derive, |
93 | "#[derive(Clone)]\nstruct Foo { a: i32<|>, }", | 93 | "#[derive(Clone)]\nstruct Foo { a: i32$0, }", |
94 | "#[derive(Clone$0)]\nstruct Foo { a: i32, }", | 94 | "#[derive(Clone$0)]\nstruct Foo { a: i32, }", |
95 | ); | 95 | ); |
96 | } | 96 | } |
@@ -102,7 +102,7 @@ mod tests { | |||
102 | " | 102 | " |
103 | /// `Foo` is a pretty important struct. | 103 | /// `Foo` is a pretty important struct. |
104 | /// It does stuff. | 104 | /// It does stuff. |
105 | struct Foo { a: i32<|>, } | 105 | struct Foo { a: i32$0, } |
106 | ", | 106 | ", |
107 | " | 107 | " |
108 | /// `Foo` is a pretty important struct. | 108 | /// `Foo` is a pretty important struct. |
@@ -121,7 +121,7 @@ struct Foo { a: i32, } | |||
121 | struct SomeThingIrrelevant; | 121 | struct SomeThingIrrelevant; |
122 | /// `Foo` is a pretty important struct. | 122 | /// `Foo` is a pretty important struct. |
123 | /// It does stuff. | 123 | /// It does stuff. |
124 | struct Foo { a: i32<|>, } | 124 | struct Foo { a: i32$0, } |
125 | struct EvenMoreIrrelevant; | 125 | struct EvenMoreIrrelevant; |
126 | ", | 126 | ", |
127 | "/// `Foo` is a pretty important struct. | 127 | "/// `Foo` is a pretty important struct. |