diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-24 10:34:25 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-24 10:34:25 +0100 |
commit | 7c28d060b5a5c4e7004282aa6827c3023c5b03c8 (patch) | |
tree | 0ed66d422a10a9f192a039565ac70b85dbdf80f8 /crates/ra_ide/src/completion/complete_trait_impl.rs | |
parent | 15c71f881607db5ddfd759785f62e4ae44aaf301 (diff) | |
parent | c749fe223bf5a41709a4bc91d0f56dafc4201658 (diff) |
Merge #5021
5021: Reduce code dupication around fixtures r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/completion/complete_trait_impl.rs')
-rw-r--r-- | crates/ra_ide/src/completion/complete_trait_impl.rs | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/crates/ra_ide/src/completion/complete_trait_impl.rs b/crates/ra_ide/src/completion/complete_trait_impl.rs index 21c9316e6..23e42928d 100644 --- a/crates/ra_ide/src/completion/complete_trait_impl.rs +++ b/crates/ra_ide/src/completion/complete_trait_impl.rs | |||
@@ -256,24 +256,24 @@ mod tests { | |||
256 | [ | 256 | [ |
257 | CompletionItem { | 257 | CompletionItem { |
258 | label: "const TEST_CONST: u16 = ", | 258 | label: "const TEST_CONST: u16 = ", |
259 | source_range: 209..210, | 259 | source_range: 112..113, |
260 | delete: 209..210, | 260 | delete: 112..113, |
261 | insert: "const TEST_CONST: u16 = ", | 261 | insert: "const TEST_CONST: u16 = ", |
262 | kind: Const, | 262 | kind: Const, |
263 | lookup: "TEST_CONST", | 263 | lookup: "TEST_CONST", |
264 | }, | 264 | }, |
265 | CompletionItem { | 265 | CompletionItem { |
266 | label: "fn test()", | 266 | label: "fn test()", |
267 | source_range: 209..210, | 267 | source_range: 112..113, |
268 | delete: 209..210, | 268 | delete: 112..113, |
269 | insert: "fn test() {\n $0\n}", | 269 | insert: "fn test() {\n $0\n}", |
270 | kind: Function, | 270 | kind: Function, |
271 | lookup: "test", | 271 | lookup: "test", |
272 | }, | 272 | }, |
273 | CompletionItem { | 273 | CompletionItem { |
274 | label: "type TestType = ", | 274 | label: "type TestType = ", |
275 | source_range: 209..210, | 275 | source_range: 112..113, |
276 | delete: 209..210, | 276 | delete: 112..113, |
277 | insert: "type TestType = ", | 277 | insert: "type TestType = ", |
278 | kind: TypeAlias, | 278 | kind: TypeAlias, |
279 | lookup: "TestType", | 279 | lookup: "TestType", |
@@ -322,8 +322,8 @@ mod tests { | |||
322 | [ | 322 | [ |
323 | CompletionItem { | 323 | CompletionItem { |
324 | label: "fn test()", | 324 | label: "fn test()", |
325 | source_range: 139..140, | 325 | source_range: 66..67, |
326 | delete: 139..140, | 326 | delete: 66..67, |
327 | insert: "fn test() {\n $0\n}", | 327 | insert: "fn test() {\n $0\n}", |
328 | kind: Function, | 328 | kind: Function, |
329 | lookup: "test", | 329 | lookup: "test", |
@@ -351,8 +351,8 @@ mod tests { | |||
351 | [ | 351 | [ |
352 | CompletionItem { | 352 | CompletionItem { |
353 | label: "fn foo()", | 353 | label: "fn foo()", |
354 | source_range: 141..142, | 354 | source_range: 68..69, |
355 | delete: 138..142, | 355 | delete: 65..69, |
356 | insert: "fn foo() {\n $0\n}", | 356 | insert: "fn foo() {\n $0\n}", |
357 | kind: Function, | 357 | kind: Function, |
358 | lookup: "foo", | 358 | lookup: "foo", |
@@ -383,8 +383,8 @@ mod tests { | |||
383 | [ | 383 | [ |
384 | CompletionItem { | 384 | CompletionItem { |
385 | label: "fn foo_bar()", | 385 | label: "fn foo_bar()", |
386 | source_range: 200..201, | 386 | source_range: 103..104, |
387 | delete: 197..201, | 387 | delete: 100..104, |
388 | insert: "fn foo_bar() {\n $0\n}", | 388 | insert: "fn foo_bar() {\n $0\n}", |
389 | kind: Function, | 389 | kind: Function, |
390 | lookup: "foo_bar", | 390 | lookup: "foo_bar", |
@@ -434,8 +434,8 @@ mod tests { | |||
434 | [ | 434 | [ |
435 | CompletionItem { | 435 | CompletionItem { |
436 | label: "fn foo()", | 436 | label: "fn foo()", |
437 | source_range: 144..145, | 437 | source_range: 71..72, |
438 | delete: 141..145, | 438 | delete: 68..72, |
439 | insert: "fn foo<T>() {\n $0\n}", | 439 | insert: "fn foo<T>() {\n $0\n}", |
440 | kind: Function, | 440 | kind: Function, |
441 | lookup: "foo", | 441 | lookup: "foo", |
@@ -463,8 +463,8 @@ mod tests { | |||
463 | [ | 463 | [ |
464 | CompletionItem { | 464 | CompletionItem { |
465 | label: "fn foo()", | 465 | label: "fn foo()", |
466 | source_range: 166..167, | 466 | source_range: 93..94, |
467 | delete: 163..167, | 467 | delete: 90..94, |
468 | insert: "fn foo<T>()\nwhere T: Into<String> {\n $0\n}", | 468 | insert: "fn foo<T>()\nwhere T: Into<String> {\n $0\n}", |
469 | kind: Function, | 469 | kind: Function, |
470 | lookup: "foo", | 470 | lookup: "foo", |
@@ -490,8 +490,8 @@ mod tests { | |||
490 | [ | 490 | [ |
491 | CompletionItem { | 491 | CompletionItem { |
492 | label: "type SomeType = ", | 492 | label: "type SomeType = ", |
493 | source_range: 124..125, | 493 | source_range: 63..64, |
494 | delete: 119..125, | 494 | delete: 58..64, |
495 | insert: "type SomeType = ", | 495 | insert: "type SomeType = ", |
496 | kind: TypeAlias, | 496 | kind: TypeAlias, |
497 | lookup: "SomeType", | 497 | lookup: "SomeType", |
@@ -517,8 +517,8 @@ mod tests { | |||
517 | [ | 517 | [ |
518 | CompletionItem { | 518 | CompletionItem { |
519 | label: "const SOME_CONST: u16 = ", | 519 | label: "const SOME_CONST: u16 = ", |
520 | source_range: 133..134, | 520 | source_range: 72..73, |
521 | delete: 127..134, | 521 | delete: 66..73, |
522 | insert: "const SOME_CONST: u16 = ", | 522 | insert: "const SOME_CONST: u16 = ", |
523 | kind: Const, | 523 | kind: Const, |
524 | lookup: "SOME_CONST", | 524 | lookup: "SOME_CONST", |
@@ -544,8 +544,8 @@ mod tests { | |||
544 | [ | 544 | [ |
545 | CompletionItem { | 545 | CompletionItem { |
546 | label: "const SOME_CONST: u16 = ", | 546 | label: "const SOME_CONST: u16 = ", |
547 | source_range: 138..139, | 547 | source_range: 77..78, |
548 | delete: 132..139, | 548 | delete: 71..78, |
549 | insert: "const SOME_CONST: u16 = ", | 549 | insert: "const SOME_CONST: u16 = ", |
550 | kind: Const, | 550 | kind: Const, |
551 | lookup: "SOME_CONST", | 551 | lookup: "SOME_CONST", |