aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion/complete_unqualified_path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/completion/complete_unqualified_path.rs')
-rw-r--r--crates/ra_ide/src/completion/complete_unqualified_path.rs320
1 files changed, 160 insertions, 160 deletions
diff --git a/crates/ra_ide/src/completion/complete_unqualified_path.rs b/crates/ra_ide/src/completion/complete_unqualified_path.rs
index 8e3dcf96e..56cd086c6 100644
--- a/crates/ra_ide/src/completion/complete_unqualified_path.rs
+++ b/crates/ra_ide/src/completion/complete_unqualified_path.rs
@@ -85,8 +85,8 @@ mod tests {
85 [ 85 [
86 CompletionItem { 86 CompletionItem {
87 label: "collections", 87 label: "collections",
88 source_range: [21; 24), 88 source_range: 21..24,
89 delete: [21; 24), 89 delete: 21..24,
90 insert: "collections", 90 insert: "collections",
91 }, 91 },
92 ] 92 ]
@@ -157,8 +157,8 @@ mod tests {
157 [ 157 [
158 CompletionItem { 158 CompletionItem {
159 label: "Enum", 159 label: "Enum",
160 source_range: [231; 233), 160 source_range: 231..233,
161 delete: [231; 233), 161 delete: 231..233,
162 insert: "Enum", 162 insert: "Enum",
163 kind: Enum, 163 kind: Enum,
164 }, 164 },
@@ -183,8 +183,8 @@ mod tests {
183 [ 183 [
184 CompletionItem { 184 CompletionItem {
185 label: "quux(…)", 185 label: "quux(…)",
186 source_range: [91; 91), 186 source_range: 91..91,
187 delete: [91; 91), 187 delete: 91..91,
188 insert: "quux(${1:x})$0", 188 insert: "quux(${1:x})$0",
189 kind: Function, 189 kind: Function,
190 lookup: "quux", 190 lookup: "quux",
@@ -193,16 +193,16 @@ mod tests {
193 }, 193 },
194 CompletionItem { 194 CompletionItem {
195 label: "x", 195 label: "x",
196 source_range: [91; 91), 196 source_range: 91..91,
197 delete: [91; 91), 197 delete: 91..91,
198 insert: "x", 198 insert: "x",
199 kind: Binding, 199 kind: Binding,
200 detail: "i32", 200 detail: "i32",
201 }, 201 },
202 CompletionItem { 202 CompletionItem {
203 label: "y", 203 label: "y",
204 source_range: [91; 91), 204 source_range: 91..91,
205 delete: [91; 91), 205 delete: 91..91,
206 insert: "y", 206 insert: "y",
207 kind: Binding, 207 kind: Binding,
208 detail: "i32", 208 detail: "i32",
@@ -232,23 +232,23 @@ mod tests {
232 [ 232 [
233 CompletionItem { 233 CompletionItem {
234 label: "a", 234 label: "a",
235 source_range: [242; 242), 235 source_range: 242..242,
236 delete: [242; 242), 236 delete: 242..242,
237 insert: "a", 237 insert: "a",
238 kind: Binding, 238 kind: Binding,
239 }, 239 },
240 CompletionItem { 240 CompletionItem {
241 label: "b", 241 label: "b",
242 source_range: [242; 242), 242 source_range: 242..242,
243 delete: [242; 242), 243 delete: 242..242,
244 insert: "b", 244 insert: "b",
245 kind: Binding, 245 kind: Binding,
246 detail: "i32", 246 detail: "i32",
247 }, 247 },
248 CompletionItem { 248 CompletionItem {
249 label: "quux()", 249 label: "quux()",
250 source_range: [242; 242), 250 source_range: 242..242,
251 delete: [242; 242), 251 delete: 242..242,
252 insert: "quux()$0", 252 insert: "quux()$0",
253 kind: Function, 253 kind: Function,
254 lookup: "quux", 254 lookup: "quux",
@@ -275,8 +275,8 @@ mod tests {
275 [ 275 [
276 CompletionItem { 276 CompletionItem {
277 label: "quux()", 277 label: "quux()",
278 source_range: [95; 95), 278 source_range: 95..95,
279 delete: [95; 95), 279 delete: 95..95,
280 insert: "quux()$0", 280 insert: "quux()$0",
281 kind: Function, 281 kind: Function,
282 lookup: "quux", 282 lookup: "quux",
@@ -284,8 +284,8 @@ mod tests {
284 }, 284 },
285 CompletionItem { 285 CompletionItem {
286 label: "x", 286 label: "x",
287 source_range: [95; 95), 287 source_range: 95..95,
288 delete: [95; 95), 288 delete: 95..95,
289 insert: "x", 289 insert: "x",
290 kind: Binding, 290 kind: Binding,
291 }, 291 },
@@ -308,15 +308,15 @@ mod tests {
308 [ 308 [
309 CompletionItem { 309 CompletionItem {
310 label: "T", 310 label: "T",
311 source_range: [52; 52), 311 source_range: 52..52,
312 delete: [52; 52), 312 delete: 52..52,
313 insert: "T", 313 insert: "T",
314 kind: TypeParam, 314 kind: TypeParam,
315 }, 315 },
316 CompletionItem { 316 CompletionItem {
317 label: "quux()", 317 label: "quux()",
318 source_range: [52; 52), 318 source_range: 52..52,
319 delete: [52; 52), 319 delete: 52..52,
320 insert: "quux()$0", 320 insert: "quux()$0",
321 kind: Function, 321 kind: Function,
322 lookup: "quux", 322 lookup: "quux",
@@ -341,22 +341,22 @@ mod tests {
341 [ 341 [
342 CompletionItem { 342 CompletionItem {
343 label: "Self", 343 label: "Self",
344 source_range: [54; 54), 344 source_range: 54..54,
345 delete: [54; 54), 345 delete: 54..54,
346 insert: "Self", 346 insert: "Self",
347 kind: TypeParam, 347 kind: TypeParam,
348 }, 348 },
349 CompletionItem { 349 CompletionItem {
350 label: "T", 350 label: "T",
351 source_range: [54; 54), 351 source_range: 54..54,
352 delete: [54; 54), 352 delete: 54..54,
353 insert: "T", 353 insert: "T",
354 kind: TypeParam, 354 kind: TypeParam,
355 }, 355 },
356 CompletionItem { 356 CompletionItem {
357 label: "X<…>", 357 label: "X<…>",
358 source_range: [54; 54), 358 source_range: 54..54,
359 delete: [54; 54), 359 delete: 54..54,
360 insert: "X<$0>", 360 insert: "X<$0>",
361 kind: Struct, 361 kind: Struct,
362 lookup: "X", 362 lookup: "X",
@@ -380,15 +380,15 @@ mod tests {
380 [ 380 [
381 CompletionItem { 381 CompletionItem {
382 label: "Self", 382 label: "Self",
383 source_range: [48; 48), 383 source_range: 48..48,
384 delete: [48; 48), 384 delete: 48..48,
385 insert: "Self", 385 insert: "Self",
386 kind: TypeParam, 386 kind: TypeParam,
387 }, 387 },
388 CompletionItem { 388 CompletionItem {
389 label: "X", 389 label: "X",
390 source_range: [48; 48), 390 source_range: 48..48,
391 delete: [48; 48), 391 delete: 48..48,
392 insert: "X", 392 insert: "X",
393 kind: Enum, 393 kind: Enum,
394 }, 394 },
@@ -413,22 +413,22 @@ mod tests {
413 [ 413 [
414 CompletionItem { 414 CompletionItem {
415 label: "Baz", 415 label: "Baz",
416 source_range: [105; 105), 416 source_range: 105..105,
417 delete: [105; 105), 417 delete: 105..105,
418 insert: "Baz", 418 insert: "Baz",
419 kind: Enum, 419 kind: Enum,
420 }, 420 },
421 CompletionItem { 421 CompletionItem {
422 label: "Foo", 422 label: "Foo",
423 source_range: [105; 105), 423 source_range: 105..105,
424 delete: [105; 105), 424 delete: 105..105,
425 insert: "Foo", 425 insert: "Foo",
426 kind: Struct, 426 kind: Struct,
427 }, 427 },
428 CompletionItem { 428 CompletionItem {
429 label: "quux()", 429 label: "quux()",
430 source_range: [105; 105), 430 source_range: 105..105,
431 delete: [105; 105), 431 delete: 105..105,
432 insert: "quux()$0", 432 insert: "quux()$0",
433 kind: Function, 433 kind: Function,
434 lookup: "quux", 434 lookup: "quux",
@@ -455,8 +455,8 @@ mod tests {
455 [ 455 [
456 CompletionItem { 456 CompletionItem {
457 label: "other_crate", 457 label: "other_crate",
458 source_range: [4; 4), 458 source_range: 4..4,
459 delete: [4; 4), 459 delete: 4..4,
460 insert: "other_crate", 460 insert: "other_crate",
461 kind: Module, 461 kind: Module,
462 }, 462 },
@@ -481,15 +481,15 @@ mod tests {
481 [ 481 [
482 CompletionItem { 482 CompletionItem {
483 label: "Bar", 483 label: "Bar",
484 source_range: [117; 117), 484 source_range: 117..117,
485 delete: [117; 117), 485 delete: 117..117,
486 insert: "Bar", 486 insert: "Bar",
487 kind: Struct, 487 kind: Struct,
488 }, 488 },
489 CompletionItem { 489 CompletionItem {
490 label: "quux()", 490 label: "quux()",
491 source_range: [117; 117), 491 source_range: 117..117,
492 delete: [117; 117), 492 delete: 117..117,
493 insert: "quux()$0", 493 insert: "quux()$0",
494 kind: Function, 494 kind: Function,
495 lookup: "quux", 495 lookup: "quux",
@@ -513,15 +513,15 @@ mod tests {
513 [ 513 [
514 CompletionItem { 514 CompletionItem {
515 label: "Foo", 515 label: "Foo",
516 source_range: [55; 55), 516 source_range: 55..55,
517 delete: [55; 55), 517 delete: 55..55,
518 insert: "Foo", 518 insert: "Foo",
519 kind: Struct, 519 kind: Struct,
520 }, 520 },
521 CompletionItem { 521 CompletionItem {
522 label: "x()", 522 label: "x()",
523 source_range: [55; 55), 523 source_range: 55..55,
524 delete: [55; 55), 524 delete: 55..55,
525 insert: "x()$0", 525 insert: "x()$0",
526 kind: Function, 526 kind: Function,
527 lookup: "x", 527 lookup: "x",
@@ -550,16 +550,16 @@ mod tests {
550 [ 550 [
551 CompletionItem { 551 CompletionItem {
552 label: "bar", 552 label: "bar",
553 source_range: [146; 146), 553 source_range: 146..146,
554 delete: [146; 146), 554 delete: 146..146,
555 insert: "bar", 555 insert: "bar",
556 kind: Binding, 556 kind: Binding,
557 detail: "i32", 557 detail: "i32",
558 }, 558 },
559 CompletionItem { 559 CompletionItem {
560 label: "foo()", 560 label: "foo()",
561 source_range: [146; 146), 561 source_range: 146..146,
562 delete: [146; 146), 562 delete: 146..146,
563 insert: "foo()$0", 563 insert: "foo()$0",
564 kind: Function, 564 kind: Function,
565 lookup: "foo", 565 lookup: "foo",
@@ -578,15 +578,15 @@ mod tests {
578 [ 578 [
579 CompletionItem { 579 CompletionItem {
580 label: "Self", 580 label: "Self",
581 source_range: [25; 25), 581 source_range: 25..25,
582 delete: [25; 25), 582 delete: 25..25,
583 insert: "Self", 583 insert: "Self",
584 kind: TypeParam, 584 kind: TypeParam,
585 }, 585 },
586 CompletionItem { 586 CompletionItem {
587 label: "self", 587 label: "self",
588 source_range: [25; 25), 588 source_range: 25..25,
589 delete: [25; 25), 589 delete: 25..25,
590 insert: "self", 590 insert: "self",
591 kind: Binding, 591 kind: Binding,
592 detail: "&{unknown}", 592 detail: "&{unknown}",
@@ -617,15 +617,15 @@ mod tests {
617 [ 617 [
618 CompletionItem { 618 CompletionItem {
619 label: "Option", 619 label: "Option",
620 source_range: [18; 18), 620 source_range: 18..18,
621 delete: [18; 18), 621 delete: 18..18,
622 insert: "Option", 622 insert: "Option",
623 kind: Struct, 623 kind: Struct,
624 }, 624 },
625 CompletionItem { 625 CompletionItem {
626 label: "foo()", 626 label: "foo()",
627 source_range: [18; 18), 627 source_range: 18..18,
628 delete: [18; 18), 628 delete: 18..18,
629 insert: "foo()$0", 629 insert: "foo()$0",
630 kind: Function, 630 kind: Function,
631 lookup: "foo", 631 lookup: "foo",
@@ -633,8 +633,8 @@ mod tests {
633 }, 633 },
634 CompletionItem { 634 CompletionItem {
635 label: "std", 635 label: "std",
636 source_range: [18; 18), 636 source_range: 18..18,
637 delete: [18; 18), 637 delete: 18..18,
638 insert: "std", 638 insert: "std",
639 kind: Module, 639 kind: Module,
640 }, 640 },
@@ -672,22 +672,22 @@ mod tests {
672 [ 672 [
673 CompletionItem { 673 CompletionItem {
674 label: "String", 674 label: "String",
675 source_range: [18; 18), 675 source_range: 18..18,
676 delete: [18; 18), 676 delete: 18..18,
677 insert: "String", 677 insert: "String",
678 kind: Struct, 678 kind: Struct,
679 }, 679 },
680 CompletionItem { 680 CompletionItem {
681 label: "core", 681 label: "core",
682 source_range: [18; 18), 682 source_range: 18..18,
683 delete: [18; 18), 683 delete: 18..18,
684 insert: "core", 684 insert: "core",
685 kind: Module, 685 kind: Module,
686 }, 686 },
687 CompletionItem { 687 CompletionItem {
688 label: "foo()", 688 label: "foo()",
689 source_range: [18; 18), 689 source_range: 18..18,
690 delete: [18; 18), 690 delete: 18..18,
691 insert: "foo()$0", 691 insert: "foo()$0",
692 kind: Function, 692 kind: Function,
693 lookup: "foo", 693 lookup: "foo",
@@ -695,8 +695,8 @@ mod tests {
695 }, 695 },
696 CompletionItem { 696 CompletionItem {
697 label: "std", 697 label: "std",
698 source_range: [18; 18), 698 source_range: 18..18,
699 delete: [18; 18), 699 delete: 18..18,
700 insert: "std", 700 insert: "std",
701 kind: Module, 701 kind: Module,
702 }, 702 },
@@ -742,46 +742,46 @@ mod tests {
742 [ 742 [
743 CompletionItem { 743 CompletionItem {
744 label: "bar!(…)", 744 label: "bar!(…)",
745 source_range: [252; 252), 745 source_range: 252..252,
746 delete: [252; 252), 746 delete: 252..252,
747 insert: "bar!($0)", 747 insert: "bar!($0)",
748 kind: Macro, 748 kind: Macro,
749 detail: "macro_rules! bar", 749 detail: "macro_rules! bar",
750 }, 750 },
751 CompletionItem { 751 CompletionItem {
752 label: "baz!(…)", 752 label: "baz!(…)",
753 source_range: [252; 252), 753 source_range: 252..252,
754 delete: [252; 252), 754 delete: 252..252,
755 insert: "baz!($0)", 755 insert: "baz!($0)",
756 kind: Macro, 756 kind: Macro,
757 detail: "#[macro_export]\nmacro_rules! baz", 757 detail: "#[macro_export]\nmacro_rules! baz",
758 }, 758 },
759 CompletionItem { 759 CompletionItem {
760 label: "foo!(…)", 760 label: "foo!(…)",
761 source_range: [252; 252), 761 source_range: 252..252,
762 delete: [252; 252), 762 delete: 252..252,
763 insert: "foo!($0)", 763 insert: "foo!($0)",
764 kind: Macro, 764 kind: Macro,
765 detail: "macro_rules! foo", 765 detail: "macro_rules! foo",
766 }, 766 },
767 CompletionItem { 767 CompletionItem {
768 label: "m1", 768 label: "m1",
769 source_range: [252; 252), 769 source_range: 252..252,
770 delete: [252; 252), 770 delete: 252..252,
771 insert: "m1", 771 insert: "m1",
772 kind: Module, 772 kind: Module,
773 }, 773 },
774 CompletionItem { 774 CompletionItem {
775 label: "m2", 775 label: "m2",
776 source_range: [252; 252), 776 source_range: 252..252,
777 delete: [252; 252), 777 delete: 252..252,
778 insert: "m2", 778 insert: "m2",
779 kind: Module, 779 kind: Module,
780 }, 780 },
781 CompletionItem { 781 CompletionItem {
782 label: "main()", 782 label: "main()",
783 source_range: [252; 252), 783 source_range: 252..252,
784 delete: [252; 252), 784 delete: 252..252,
785 insert: "main()$0", 785 insert: "main()$0",
786 kind: Function, 786 kind: Function,
787 lookup: "main", 787 lookup: "main",
@@ -811,16 +811,16 @@ mod tests {
811 [ 811 [
812 CompletionItem { 812 CompletionItem {
813 label: "foo!(…)", 813 label: "foo!(…)",
814 source_range: [49; 49), 814 source_range: 49..49,
815 delete: [49; 49), 815 delete: 49..49,
816 insert: "foo!($0)", 816 insert: "foo!($0)",
817 kind: Macro, 817 kind: Macro,
818 detail: "macro_rules! foo", 818 detail: "macro_rules! foo",
819 }, 819 },
820 CompletionItem { 820 CompletionItem {
821 label: "foo()", 821 label: "foo()",
822 source_range: [49; 49), 822 source_range: 49..49,
823 delete: [49; 49), 823 delete: 49..49,
824 insert: "foo()$0", 824 insert: "foo()$0",
825 kind: Function, 825 kind: Function,
826 lookup: "foo", 826 lookup: "foo",
@@ -850,16 +850,16 @@ mod tests {
850 [ 850 [
851 CompletionItem { 851 CompletionItem {
852 label: "foo!(…)", 852 label: "foo!(…)",
853 source_range: [57; 57), 853 source_range: 57..57,
854 delete: [57; 57), 854 delete: 57..57,
855 insert: "foo!($0)", 855 insert: "foo!($0)",
856 kind: Macro, 856 kind: Macro,
857 detail: "macro_rules! foo", 857 detail: "macro_rules! foo",
858 }, 858 },
859 CompletionItem { 859 CompletionItem {
860 label: "main()", 860 label: "main()",
861 source_range: [57; 57), 861 source_range: 57..57,
862 delete: [57; 57), 862 delete: 57..57,
863 insert: "main()$0", 863 insert: "main()$0",
864 kind: Function, 864 kind: Function,
865 lookup: "main", 865 lookup: "main",
@@ -889,16 +889,16 @@ mod tests {
889 [ 889 [
890 CompletionItem { 890 CompletionItem {
891 label: "foo!(…)", 891 label: "foo!(…)",
892 source_range: [50; 50), 892 source_range: 50..50,
893 delete: [50; 50), 893 delete: 50..50,
894 insert: "foo!($0)", 894 insert: "foo!($0)",
895 kind: Macro, 895 kind: Macro,
896 detail: "macro_rules! foo", 896 detail: "macro_rules! foo",
897 }, 897 },
898 CompletionItem { 898 CompletionItem {
899 label: "main()", 899 label: "main()",
900 source_range: [50; 50), 900 source_range: 50..50,
901 delete: [50; 50), 901 delete: 50..50,
902 insert: "main()$0", 902 insert: "main()$0",
903 kind: Function, 903 kind: Function,
904 lookup: "main", 904 lookup: "main",
@@ -925,8 +925,8 @@ mod tests {
925 [ 925 [
926 CompletionItem { 926 CompletionItem {
927 label: "frobnicate()", 927 label: "frobnicate()",
928 source_range: [23; 24), 928 source_range: 23..24,
929 delete: [23; 24), 929 delete: 23..24,
930 insert: "frobnicate()$0", 930 insert: "frobnicate()$0",
931 kind: Function, 931 kind: Function,
932 lookup: "frobnicate", 932 lookup: "frobnicate",
@@ -934,8 +934,8 @@ mod tests {
934 }, 934 },
935 CompletionItem { 935 CompletionItem {
936 label: "main()", 936 label: "main()",
937 source_range: [23; 24), 937 source_range: 23..24,
938 delete: [23; 24), 938 delete: 23..24,
939 insert: "main()$0", 939 insert: "main()$0",
940 kind: Function, 940 kind: Function,
941 lookup: "main", 941 lookup: "main",
@@ -962,16 +962,16 @@ mod tests {
962 [ 962 [
963 CompletionItem { 963 CompletionItem {
964 label: "m!(…)", 964 label: "m!(…)",
965 source_range: [145; 145), 965 source_range: 145..145,
966 delete: [145; 145), 966 delete: 145..145,
967 insert: "m!($0)", 967 insert: "m!($0)",
968 kind: Macro, 968 kind: Macro,
969 detail: "macro_rules! m", 969 detail: "macro_rules! m",
970 }, 970 },
971 CompletionItem { 971 CompletionItem {
972 label: "quux(…)", 972 label: "quux(…)",
973 source_range: [145; 145), 973 source_range: 145..145,
974 delete: [145; 145), 974 delete: 145..145,
975 insert: "quux(${1:x})$0", 975 insert: "quux(${1:x})$0",
976 kind: Function, 976 kind: Function,
977 lookup: "quux", 977 lookup: "quux",
@@ -980,16 +980,16 @@ mod tests {
980 }, 980 },
981 CompletionItem { 981 CompletionItem {
982 label: "x", 982 label: "x",
983 source_range: [145; 145), 983 source_range: 145..145,
984 delete: [145; 145), 984 delete: 145..145,
985 insert: "x", 985 insert: "x",
986 kind: Binding, 986 kind: Binding,
987 detail: "i32", 987 detail: "i32",
988 }, 988 },
989 CompletionItem { 989 CompletionItem {
990 label: "y", 990 label: "y",
991 source_range: [145; 145), 991 source_range: 145..145,
992 delete: [145; 145), 992 delete: 145..145,
993 insert: "y", 993 insert: "y",
994 kind: Binding, 994 kind: Binding,
995 detail: "i32", 995 detail: "i32",
@@ -1015,16 +1015,16 @@ mod tests {
1015 [ 1015 [
1016 CompletionItem { 1016 CompletionItem {
1017 label: "m!(…)", 1017 label: "m!(…)",
1018 source_range: [145; 146), 1018 source_range: 145..146,
1019 delete: [145; 146), 1019 delete: 145..146,
1020 insert: "m!($0)", 1020 insert: "m!($0)",
1021 kind: Macro, 1021 kind: Macro,
1022 detail: "macro_rules! m", 1022 detail: "macro_rules! m",
1023 }, 1023 },
1024 CompletionItem { 1024 CompletionItem {
1025 label: "quux(…)", 1025 label: "quux(…)",
1026 source_range: [145; 146), 1026 source_range: 145..146,
1027 delete: [145; 146), 1027 delete: 145..146,
1028 insert: "quux(${1:x})$0", 1028 insert: "quux(${1:x})$0",
1029 kind: Function, 1029 kind: Function,
1030 lookup: "quux", 1030 lookup: "quux",
@@ -1033,16 +1033,16 @@ mod tests {
1033 }, 1033 },
1034 CompletionItem { 1034 CompletionItem {
1035 label: "x", 1035 label: "x",
1036 source_range: [145; 146), 1036 source_range: 145..146,
1037 delete: [145; 146), 1037 delete: 145..146,
1038 insert: "x", 1038 insert: "x",
1039 kind: Binding, 1039 kind: Binding,
1040 detail: "i32", 1040 detail: "i32",
1041 }, 1041 },
1042 CompletionItem { 1042 CompletionItem {
1043 label: "y", 1043 label: "y",
1044 source_range: [145; 146), 1044 source_range: 145..146,
1045 delete: [145; 146), 1045 delete: 145..146,
1046 insert: "y", 1046 insert: "y",
1047 kind: Binding, 1047 kind: Binding,
1048 detail: "i32", 1048 detail: "i32",
@@ -1068,16 +1068,16 @@ mod tests {
1068 [ 1068 [
1069 CompletionItem { 1069 CompletionItem {
1070 label: "m!(…)", 1070 label: "m!(…)",
1071 source_range: [145; 146), 1071 source_range: 145..146,
1072 delete: [145; 146), 1072 delete: 145..146,
1073 insert: "m!($0)", 1073 insert: "m!($0)",
1074 kind: Macro, 1074 kind: Macro,
1075 detail: "macro_rules! m", 1075 detail: "macro_rules! m",
1076 }, 1076 },
1077 CompletionItem { 1077 CompletionItem {
1078 label: "quux(…)", 1078 label: "quux(…)",
1079 source_range: [145; 146), 1079 source_range: 145..146,
1080 delete: [145; 146), 1080 delete: 145..146,
1081 insert: "quux(${1:x})$0", 1081 insert: "quux(${1:x})$0",
1082 kind: Function, 1082 kind: Function,
1083 lookup: "quux", 1083 lookup: "quux",
@@ -1086,16 +1086,16 @@ mod tests {
1086 }, 1086 },
1087 CompletionItem { 1087 CompletionItem {
1088 label: "x", 1088 label: "x",
1089 source_range: [145; 146), 1089 source_range: 145..146,
1090 delete: [145; 146), 1090 delete: 145..146,
1091 insert: "x", 1091 insert: "x",
1092 kind: Binding, 1092 kind: Binding,
1093 detail: "i32", 1093 detail: "i32",
1094 }, 1094 },
1095 CompletionItem { 1095 CompletionItem {
1096 label: "y", 1096 label: "y",
1097 source_range: [145; 146), 1097 source_range: 145..146,
1098 delete: [145; 146), 1098 delete: 145..146,
1099 insert: "y", 1099 insert: "y",
1100 kind: Binding, 1100 kind: Binding,
1101 detail: "i32", 1101 detail: "i32",
@@ -1121,14 +1121,14 @@ mod tests {
1121 [ 1121 [
1122 CompletionItem { 1122 CompletionItem {
1123 label: "Quux", 1123 label: "Quux",
1124 source_range: [82; 82), 1124 source_range: 82..82,
1125 delete: [82; 82), 1125 delete: 82..82,
1126 insert: "Quux", 1126 insert: "Quux",
1127 }, 1127 },
1128 CompletionItem { 1128 CompletionItem {
1129 label: "main()", 1129 label: "main()",
1130 source_range: [82; 82), 1130 source_range: 82..82,
1131 delete: [82; 82), 1131 delete: 82..82,
1132 insert: "main()$0", 1132 insert: "main()$0",
1133 kind: Function, 1133 kind: Function,
1134 lookup: "main", 1134 lookup: "main",
@@ -1162,31 +1162,31 @@ mod tests {
1162 [ 1162 [
1163 CompletionItem { 1163 CompletionItem {
1164 label: "Foo", 1164 label: "Foo",
1165 source_range: [248; 250), 1165 source_range: 248..250,
1166 delete: [248; 250), 1166 delete: 248..250,
1167 insert: "Foo", 1167 insert: "Foo",
1168 kind: Enum, 1168 kind: Enum,
1169 }, 1169 },
1170 CompletionItem { 1170 CompletionItem {
1171 label: "Foo::Bar", 1171 label: "Foo::Bar",
1172 source_range: [248; 250), 1172 source_range: 248..250,
1173 delete: [248; 250), 1173 delete: 248..250,
1174 insert: "Foo::Bar", 1174 insert: "Foo::Bar",
1175 kind: EnumVariant, 1175 kind: EnumVariant,
1176 detail: "()", 1176 detail: "()",
1177 }, 1177 },
1178 CompletionItem { 1178 CompletionItem {
1179 label: "Foo::Baz", 1179 label: "Foo::Baz",
1180 source_range: [248; 250), 1180 source_range: 248..250,
1181 delete: [248; 250), 1181 delete: 248..250,
1182 insert: "Foo::Baz", 1182 insert: "Foo::Baz",
1183 kind: EnumVariant, 1183 kind: EnumVariant,
1184 detail: "()", 1184 detail: "()",
1185 }, 1185 },
1186 CompletionItem { 1186 CompletionItem {
1187 label: "Foo::Quux", 1187 label: "Foo::Quux",
1188 source_range: [248; 250), 1188 source_range: 248..250,
1189 delete: [248; 250), 1189 delete: 248..250,
1190 insert: "Foo::Quux", 1190 insert: "Foo::Quux",
1191 kind: EnumVariant, 1191 kind: EnumVariant,
1192 detail: "()", 1192 detail: "()",
@@ -1220,31 +1220,31 @@ mod tests {
1220 [ 1220 [
1221 CompletionItem { 1221 CompletionItem {
1222 label: "Foo", 1222 label: "Foo",
1223 source_range: [219; 221), 1223 source_range: 219..221,
1224 delete: [219; 221), 1224 delete: 219..221,
1225 insert: "Foo", 1225 insert: "Foo",
1226 kind: Enum, 1226 kind: Enum,
1227 }, 1227 },
1228 CompletionItem { 1228 CompletionItem {
1229 label: "Foo::Bar", 1229 label: "Foo::Bar",
1230 source_range: [219; 221), 1230 source_range: 219..221,
1231 delete: [219; 221), 1231 delete: 219..221,
1232 insert: "Foo::Bar", 1232 insert: "Foo::Bar",
1233 kind: EnumVariant, 1233 kind: EnumVariant,
1234 detail: "()", 1234 detail: "()",
1235 }, 1235 },
1236 CompletionItem { 1236 CompletionItem {
1237 label: "Foo::Baz", 1237 label: "Foo::Baz",
1238 source_range: [219; 221), 1238 source_range: 219..221,
1239 delete: [219; 221), 1239 delete: 219..221,
1240 insert: "Foo::Baz", 1240 insert: "Foo::Baz",
1241 kind: EnumVariant, 1241 kind: EnumVariant,
1242 detail: "()", 1242 detail: "()",
1243 }, 1243 },
1244 CompletionItem { 1244 CompletionItem {
1245 label: "Foo::Quux", 1245 label: "Foo::Quux",
1246 source_range: [219; 221), 1246 source_range: 219..221,
1247 delete: [219; 221), 1247 delete: 219..221,
1248 insert: "Foo::Quux", 1248 insert: "Foo::Quux",
1249 kind: EnumVariant, 1249 kind: EnumVariant,
1250 detail: "()", 1250 detail: "()",
@@ -1274,39 +1274,39 @@ mod tests {
1274 [ 1274 [
1275 CompletionItem { 1275 CompletionItem {
1276 label: "Foo", 1276 label: "Foo",
1277 source_range: [185; 186), 1277 source_range: 185..186,
1278 delete: [185; 186), 1278 delete: 185..186,
1279 insert: "Foo", 1279 insert: "Foo",
1280 kind: Enum, 1280 kind: Enum,
1281 }, 1281 },
1282 CompletionItem { 1282 CompletionItem {
1283 label: "Foo::Bar", 1283 label: "Foo::Bar",
1284 source_range: [185; 186), 1284 source_range: 185..186,
1285 delete: [185; 186), 1285 delete: 185..186,
1286 insert: "Foo::Bar", 1286 insert: "Foo::Bar",
1287 kind: EnumVariant, 1287 kind: EnumVariant,
1288 detail: "()", 1288 detail: "()",
1289 }, 1289 },
1290 CompletionItem { 1290 CompletionItem {
1291 label: "Foo::Baz", 1291 label: "Foo::Baz",
1292 source_range: [185; 186), 1292 source_range: 185..186,
1293 delete: [185; 186), 1293 delete: 185..186,
1294 insert: "Foo::Baz", 1294 insert: "Foo::Baz",
1295 kind: EnumVariant, 1295 kind: EnumVariant,
1296 detail: "()", 1296 detail: "()",
1297 }, 1297 },
1298 CompletionItem { 1298 CompletionItem {
1299 label: "Foo::Quux", 1299 label: "Foo::Quux",
1300 source_range: [185; 186), 1300 source_range: 185..186,
1301 delete: [185; 186), 1301 delete: 185..186,
1302 insert: "Foo::Quux", 1302 insert: "Foo::Quux",
1303 kind: EnumVariant, 1303 kind: EnumVariant,
1304 detail: "()", 1304 detail: "()",
1305 }, 1305 },
1306 CompletionItem { 1306 CompletionItem {
1307 label: "main()", 1307 label: "main()",
1308 source_range: [185; 186), 1308 source_range: 185..186,
1309 delete: [185; 186), 1309 delete: 185..186,
1310 insert: "main()$0", 1310 insert: "main()$0",
1311 kind: Function, 1311 kind: Function,
1312 lookup: "main", 1312 lookup: "main",
@@ -1333,8 +1333,8 @@ mod tests {
1333 [ 1333 [
1334 CompletionItem { 1334 CompletionItem {
1335 label: "f()", 1335 label: "f()",
1336 source_range: [98; 99), 1336 source_range: 98..99,
1337 delete: [98; 99), 1337 delete: 98..99,
1338 insert: "f()$0", 1338 insert: "f()$0",
1339 kind: Function, 1339 kind: Function,
1340 lookup: "f", 1340 lookup: "f",
@@ -1342,15 +1342,15 @@ mod tests {
1342 }, 1342 },
1343 CompletionItem { 1343 CompletionItem {
1344 label: "m", 1344 label: "m",
1345 source_range: [98; 99), 1345 source_range: 98..99,
1346 delete: [98; 99), 1346 delete: 98..99,
1347 insert: "m", 1347 insert: "m",
1348 kind: Module, 1348 kind: Module,
1349 }, 1349 },
1350 CompletionItem { 1350 CompletionItem {
1351 label: "m::E::V", 1351 label: "m::E::V",
1352 source_range: [98; 99), 1352 source_range: 98..99,
1353 delete: [98; 99), 1353 delete: 98..99,
1354 insert: "m::E::V", 1354 insert: "m::E::V",
1355 kind: EnumVariant, 1355 kind: EnumVariant,
1356 detail: "()", 1356 detail: "()",