aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/completions/record.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-07 12:27:17 +0000
committerGitHub <[email protected]>2021-01-07 12:27:17 +0000
commit7967ce85cfc5fc2b1996425b44f2a45d0841c8ff (patch)
tree4495b9de7ea6c8e9dd9fd347d42517e9dee511fa /crates/completion/src/completions/record.rs
parentc3e9fb183bc287d83b97b776edc87c54d18d1a73 (diff)
parent72b9a4fbd3c12f3250b9157a1d44230e04ec8b22 (diff)
Merge #7184
7184: Changes Cursor Marker To $0 r=matklad a=kevaundray Co-authored-by: Kevaundray Wedderburn <[email protected]>
Diffstat (limited to 'crates/completion/src/completions/record.rs')
-rw-r--r--crates/completion/src/completions/record.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/crates/completion/src/completions/record.rs b/crates/completion/src/completions/record.rs
index e58b9a274..bb6354ded 100644
--- a/crates/completion/src/completions/record.rs
+++ b/crates/completion/src/completions/record.rs
@@ -99,7 +99,7 @@ impl core::default::Default for S {
99fn process(f: S) { 99fn process(f: S) {
100 let other = S { 100 let other = S {
101 foo: 5, 101 foo: 5,
102 .<|> 102 .$0
103 }; 103 };
104} 104}
105"#; 105"#;
@@ -139,7 +139,7 @@ impl core::default::Default for S {
139fn process(f: S) { 139fn process(f: S) {
140 let other = S { 140 let other = S {
141 foo: 5, 141 foo: 5,
142 .<|> 142 .$0
143 }; 143 };
144} 144}
145"#, 145"#,
@@ -173,7 +173,7 @@ struct S { foo: u32, bar: usize }
173fn process(f: S) { 173fn process(f: S) {
174 let other = S { 174 let other = S {
175 foo: 5, 175 foo: 5,
176 .<|> 176 .$0
177 }; 177 };
178} 178}
179"#; 179"#;
@@ -201,7 +201,7 @@ struct S { foo: u32 }
201 201
202fn process(f: S) { 202fn process(f: S) {
203 match f { 203 match f {
204 S { f<|>: 92 } => (), 204 S { f$0: 92 } => (),
205 } 205 }
206} 206}
207"#, 207"#,
@@ -219,7 +219,7 @@ enum E { S { foo: u32, bar: () } }
219 219
220fn process(e: E) { 220fn process(e: E) {
221 match e { 221 match e {
222 E::S { <|> } => (), 222 E::S { $0 } => (),
223 } 223 }
224} 224}
225"#, 225"#,
@@ -239,7 +239,7 @@ struct S { foo: u32 }
239 239
240fn process(f: S) { 240fn process(f: S) {
241 m!(match f { 241 m!(match f {
242 S { f<|>: 92 } => (), 242 S { f$0: 92 } => (),
243 }) 243 })
244} 244}
245", 245",
@@ -263,7 +263,7 @@ fn main() {
263 foo1: 1, foo2: 2, 263 foo1: 1, foo2: 2,
264 bar: 3, baz: 4, 264 bar: 3, baz: 4,
265 }; 265 };
266 if let S { foo1, foo2: a, <|> } = s {} 266 if let S { foo1, foo2: a, $0 } = s {}
267} 267}
268"#, 268"#,
269 expect![[r#" 269 expect![[r#"
@@ -279,7 +279,7 @@ fn main() {
279 r#" 279 r#"
280struct A { the_field: u32 } 280struct A { the_field: u32 }
281fn foo() { 281fn foo() {
282 A { the<|> } 282 A { the$0 }
283} 283}
284"#, 284"#,
285 expect![[r#" 285 expect![[r#"
@@ -294,7 +294,7 @@ fn foo() {
294 r#" 294 r#"
295enum E { A { a: u32 } } 295enum E { A { a: u32 } }
296fn foo() { 296fn foo() {
297 let _ = E::A { <|> } 297 let _ = E::A { $0 }
298} 298}
299"#, 299"#,
300 expect![[r#" 300 expect![[r#"
@@ -311,7 +311,7 @@ struct A { a: u32 }
311struct B { b: u32 } 311struct B { b: u32 }
312 312
313fn foo() { 313fn foo() {
314 let _: A = B { <|> } 314 let _: A = B { $0 }
315} 315}
316"#, 316"#,
317 expect![[r#" 317 expect![[r#"
@@ -327,7 +327,7 @@ fn foo() {
327struct A<T> { a: T } 327struct A<T> { a: T }
328 328
329fn foo() { 329fn foo() {
330 let _: A<u32> = A { <|> } 330 let _: A<u32> = A { $0 }
331} 331}
332"#, 332"#,
333 expect![[r#" 333 expect![[r#"
@@ -343,7 +343,7 @@ fn foo() {
343macro_rules! m { ($e:expr) => { $e } } 343macro_rules! m { ($e:expr) => { $e } }
344struct A { the_field: u32 } 344struct A { the_field: u32 }
345fn foo() { 345fn foo() {
346 m!(A { the<|> }) 346 m!(A { the$0 })
347} 347}
348"#, 348"#,
349 expect![[r#" 349 expect![[r#"
@@ -363,7 +363,7 @@ struct S {
363 363
364fn main() { 364fn main() {
365 let foo1 = 1; 365 let foo1 = 1;
366 let s = S { foo1, foo2: 5, <|> } 366 let s = S { foo1, foo2: 5, $0 }
367} 367}
368"#, 368"#,
369 expect![[r#" 369 expect![[r#"
@@ -381,7 +381,7 @@ struct S { foo1: u32, foo2: u32 }
381 381
382fn main() { 382fn main() {
383 let foo1 = 1; 383 let foo1 = 1;
384 let s = S { foo1, <|> .. loop {} } 384 let s = S { foo1, $0 .. loop {} }
385} 385}
386"#, 386"#,
387 expect![[r#" 387 expect![[r#"