diff options
Diffstat (limited to 'crates/assists/src/handlers/reorder_fields.rs')
-rw-r--r-- | crates/assists/src/handlers/reorder_fields.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/assists/src/handlers/reorder_fields.rs b/crates/assists/src/handlers/reorder_fields.rs index fe5574242..fba7d6ddb 100644 --- a/crates/assists/src/handlers/reorder_fields.rs +++ b/crates/assists/src/handlers/reorder_fields.rs | |||
@@ -15,7 +15,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists}; | |||
15 | // | 15 | // |
16 | // ``` | 16 | // ``` |
17 | // struct Foo {foo: i32, bar: i32}; | 17 | // struct Foo {foo: i32, bar: i32}; |
18 | // const test: Foo = <|>Foo {bar: 0, foo: 1} | 18 | // const test: Foo = $0Foo {bar: 0, foo: 1} |
19 | // ``` | 19 | // ``` |
20 | // -> | 20 | // -> |
21 | // ``` | 21 | // ``` |
@@ -126,7 +126,7 @@ struct Foo { | |||
126 | bar: i32, | 126 | bar: i32, |
127 | } | 127 | } |
128 | 128 | ||
129 | const test: Foo = <|>Foo { foo: 0, bar: 0 }; | 129 | const test: Foo = $0Foo { foo: 0, bar: 0 }; |
130 | "#, | 130 | "#, |
131 | ) | 131 | ) |
132 | } | 132 | } |
@@ -137,7 +137,7 @@ const test: Foo = <|>Foo { foo: 0, bar: 0 }; | |||
137 | reorder_fields, | 137 | reorder_fields, |
138 | r#" | 138 | r#" |
139 | struct Foo {}; | 139 | struct Foo {}; |
140 | const test: Foo = <|>Foo {} | 140 | const test: Foo = $0Foo {} |
141 | "#, | 141 | "#, |
142 | ) | 142 | ) |
143 | } | 143 | } |
@@ -148,7 +148,7 @@ const test: Foo = <|>Foo {} | |||
148 | reorder_fields, | 148 | reorder_fields, |
149 | r#" | 149 | r#" |
150 | struct Foo {foo: i32, bar: i32}; | 150 | struct Foo {foo: i32, bar: i32}; |
151 | const test: Foo = <|>Foo {bar: 0, foo: 1} | 151 | const test: Foo = $0Foo {bar: 0, foo: 1} |
152 | "#, | 152 | "#, |
153 | r#" | 153 | r#" |
154 | struct Foo {foo: i32, bar: i32}; | 154 | struct Foo {foo: i32, bar: i32}; |
@@ -166,7 +166,7 @@ struct Foo { foo: i64, bar: i64, baz: i64 } | |||
166 | 166 | ||
167 | fn f(f: Foo) -> { | 167 | fn f(f: Foo) -> { |
168 | match f { | 168 | match f { |
169 | <|>Foo { baz: 0, ref mut bar, .. } => (), | 169 | $0Foo { baz: 0, ref mut bar, .. } => (), |
170 | _ => () | 170 | _ => () |
171 | } | 171 | } |
172 | } | 172 | } |
@@ -197,7 +197,7 @@ struct Foo { | |||
197 | impl Foo { | 197 | impl Foo { |
198 | fn new() -> Foo { | 198 | fn new() -> Foo { |
199 | let foo = String::new(); | 199 | let foo = String::new(); |
200 | <|>Foo { | 200 | $0Foo { |
201 | bar: foo.clone(), | 201 | bar: foo.clone(), |
202 | extra: "Extra field", | 202 | extra: "Extra field", |
203 | foo, | 203 | foo, |