diff options
Diffstat (limited to 'crates/ra_ide/src/completion/complete_attribute.rs')
-rw-r--r-- | crates/ra_ide/src/completion/complete_attribute.rs | 312 |
1 files changed, 156 insertions, 156 deletions
diff --git a/crates/ra_ide/src/completion/complete_attribute.rs b/crates/ra_ide/src/completion/complete_attribute.rs index ade17a1ff..6beeca457 100644 --- a/crates/ra_ide/src/completion/complete_attribute.rs +++ b/crates/ra_ide/src/completion/complete_attribute.rs | |||
@@ -333,69 +333,69 @@ mod tests { | |||
333 | [ | 333 | [ |
334 | CompletionItem { | 334 | CompletionItem { |
335 | label: "Clone", | 335 | label: "Clone", |
336 | source_range: 30..30, | 336 | source_range: 9..9, |
337 | delete: 30..30, | 337 | delete: 9..9, |
338 | insert: "Clone", | 338 | insert: "Clone", |
339 | kind: Attribute, | 339 | kind: Attribute, |
340 | }, | 340 | }, |
341 | CompletionItem { | 341 | CompletionItem { |
342 | label: "Copy, Clone", | 342 | label: "Copy, Clone", |
343 | source_range: 30..30, | 343 | source_range: 9..9, |
344 | delete: 30..30, | 344 | delete: 9..9, |
345 | insert: "Copy, Clone", | 345 | insert: "Copy, Clone", |
346 | kind: Attribute, | 346 | kind: Attribute, |
347 | }, | 347 | }, |
348 | CompletionItem { | 348 | CompletionItem { |
349 | label: "Debug", | 349 | label: "Debug", |
350 | source_range: 30..30, | 350 | source_range: 9..9, |
351 | delete: 30..30, | 351 | delete: 9..9, |
352 | insert: "Debug", | 352 | insert: "Debug", |
353 | kind: Attribute, | 353 | kind: Attribute, |
354 | }, | 354 | }, |
355 | CompletionItem { | 355 | CompletionItem { |
356 | label: "Default", | 356 | label: "Default", |
357 | source_range: 30..30, | 357 | source_range: 9..9, |
358 | delete: 30..30, | 358 | delete: 9..9, |
359 | insert: "Default", | 359 | insert: "Default", |
360 | kind: Attribute, | 360 | kind: Attribute, |
361 | }, | 361 | }, |
362 | CompletionItem { | 362 | CompletionItem { |
363 | label: "Eq, PartialEq", | 363 | label: "Eq, PartialEq", |
364 | source_range: 30..30, | 364 | source_range: 9..9, |
365 | delete: 30..30, | 365 | delete: 9..9, |
366 | insert: "Eq, PartialEq", | 366 | insert: "Eq, PartialEq", |
367 | kind: Attribute, | 367 | kind: Attribute, |
368 | }, | 368 | }, |
369 | CompletionItem { | 369 | CompletionItem { |
370 | label: "Hash", | 370 | label: "Hash", |
371 | source_range: 30..30, | 371 | source_range: 9..9, |
372 | delete: 30..30, | 372 | delete: 9..9, |
373 | insert: "Hash", | 373 | insert: "Hash", |
374 | kind: Attribute, | 374 | kind: Attribute, |
375 | }, | 375 | }, |
376 | CompletionItem { | 376 | CompletionItem { |
377 | label: "Ord, PartialOrd, Eq, PartialEq", | 377 | label: "Ord, PartialOrd, Eq, PartialEq", |
378 | source_range: 30..30, | 378 | source_range: 9..9, |
379 | delete: 30..30, | 379 | delete: 9..9, |
380 | insert: "Ord, PartialOrd, Eq, PartialEq", | 380 | insert: "Ord, PartialOrd, Eq, PartialEq", |
381 | kind: Attribute, | 381 | kind: Attribute, |
382 | }, | 382 | }, |
383 | CompletionItem { | 383 | CompletionItem { |
384 | label: "PartialEq", | 384 | label: "PartialEq", |
385 | source_range: 30..30, | 385 | source_range: 9..9, |
386 | delete: 30..30, | 386 | delete: 9..9, |
387 | insert: "PartialEq", | 387 | insert: "PartialEq", |
388 | kind: Attribute, | 388 | kind: Attribute, |
389 | }, | 389 | }, |
390 | CompletionItem { | 390 | CompletionItem { |
391 | label: "PartialOrd, PartialEq", | 391 | label: "PartialOrd, PartialEq", |
392 | source_range: 30..30, | 392 | source_range: 9..9, |
393 | delete: 30..30, | 393 | delete: 9..9, |
394 | insert: "PartialOrd, PartialEq", | 394 | insert: "PartialOrd, PartialEq", |
395 | kind: Attribute, | 395 | kind: Attribute, |
396 | }, | 396 | }, |
397 | ] | 397 | ] |
398 | "### | 398 | "### |
399 | ); | 399 | ); |
400 | } | 400 | } |
401 | 401 | ||
@@ -425,62 +425,62 @@ mod tests { | |||
425 | [ | 425 | [ |
426 | CompletionItem { | 426 | CompletionItem { |
427 | label: "Clone", | 427 | label: "Clone", |
428 | source_range: 59..59, | 428 | source_range: 38..38, |
429 | delete: 59..59, | 429 | delete: 38..38, |
430 | insert: "Clone", | 430 | insert: "Clone", |
431 | kind: Attribute, | 431 | kind: Attribute, |
432 | }, | 432 | }, |
433 | CompletionItem { | 433 | CompletionItem { |
434 | label: "Copy, Clone", | 434 | label: "Copy, Clone", |
435 | source_range: 59..59, | 435 | source_range: 38..38, |
436 | delete: 59..59, | 436 | delete: 38..38, |
437 | insert: "Copy, Clone", | 437 | insert: "Copy, Clone", |
438 | kind: Attribute, | 438 | kind: Attribute, |
439 | }, | 439 | }, |
440 | CompletionItem { | 440 | CompletionItem { |
441 | label: "Debug", | 441 | label: "Debug", |
442 | source_range: 59..59, | 442 | source_range: 38..38, |
443 | delete: 59..59, | 443 | delete: 38..38, |
444 | insert: "Debug", | 444 | insert: "Debug", |
445 | kind: Attribute, | 445 | kind: Attribute, |
446 | }, | 446 | }, |
447 | CompletionItem { | 447 | CompletionItem { |
448 | label: "Default", | 448 | label: "Default", |
449 | source_range: 59..59, | 449 | source_range: 38..38, |
450 | delete: 59..59, | 450 | delete: 38..38, |
451 | insert: "Default", | 451 | insert: "Default", |
452 | kind: Attribute, | 452 | kind: Attribute, |
453 | }, | 453 | }, |
454 | CompletionItem { | 454 | CompletionItem { |
455 | label: "Eq", | 455 | label: "Eq", |
456 | source_range: 59..59, | 456 | source_range: 38..38, |
457 | delete: 59..59, | 457 | delete: 38..38, |
458 | insert: "Eq", | 458 | insert: "Eq", |
459 | kind: Attribute, | 459 | kind: Attribute, |
460 | }, | 460 | }, |
461 | CompletionItem { | 461 | CompletionItem { |
462 | label: "Hash", | 462 | label: "Hash", |
463 | source_range: 59..59, | 463 | source_range: 38..38, |
464 | delete: 59..59, | 464 | delete: 38..38, |
465 | insert: "Hash", | 465 | insert: "Hash", |
466 | kind: Attribute, | 466 | kind: Attribute, |
467 | }, | 467 | }, |
468 | CompletionItem { | 468 | CompletionItem { |
469 | label: "Ord, PartialOrd, Eq", | 469 | label: "Ord, PartialOrd, Eq", |
470 | source_range: 59..59, | 470 | source_range: 38..38, |
471 | delete: 59..59, | 471 | delete: 38..38, |
472 | insert: "Ord, PartialOrd, Eq", | 472 | insert: "Ord, PartialOrd, Eq", |
473 | kind: Attribute, | 473 | kind: Attribute, |
474 | }, | 474 | }, |
475 | CompletionItem { | 475 | CompletionItem { |
476 | label: "PartialOrd", | 476 | label: "PartialOrd", |
477 | source_range: 59..59, | 477 | source_range: 38..38, |
478 | delete: 59..59, | 478 | delete: 38..38, |
479 | insert: "PartialOrd", | 479 | insert: "PartialOrd", |
480 | kind: Attribute, | 480 | kind: Attribute, |
481 | }, | 481 | }, |
482 | ] | 482 | ] |
483 | "### | 483 | "### |
484 | ); | 484 | ); |
485 | } | 485 | } |
486 | 486 | ||
@@ -496,207 +496,207 @@ mod tests { | |||
496 | [ | 496 | [ |
497 | CompletionItem { | 497 | CompletionItem { |
498 | label: "allow(…)", | 498 | label: "allow(…)", |
499 | source_range: 19..19, | 499 | source_range: 2..2, |
500 | delete: 19..19, | 500 | delete: 2..2, |
501 | insert: "allow(${0:lint})", | 501 | insert: "allow(${0:lint})", |
502 | kind: Attribute, | 502 | kind: Attribute, |
503 | lookup: "allow", | 503 | lookup: "allow", |
504 | }, | 504 | }, |
505 | CompletionItem { | 505 | CompletionItem { |
506 | label: "cfg(…)", | 506 | label: "cfg(…)", |
507 | source_range: 19..19, | 507 | source_range: 2..2, |
508 | delete: 19..19, | 508 | delete: 2..2, |
509 | insert: "cfg(${0:predicate})", | 509 | insert: "cfg(${0:predicate})", |
510 | kind: Attribute, | 510 | kind: Attribute, |
511 | lookup: "cfg", | 511 | lookup: "cfg", |
512 | }, | 512 | }, |
513 | CompletionItem { | 513 | CompletionItem { |
514 | label: "cfg_attr(…)", | 514 | label: "cfg_attr(…)", |
515 | source_range: 19..19, | 515 | source_range: 2..2, |
516 | delete: 19..19, | 516 | delete: 2..2, |
517 | insert: "cfg_attr(${1:predicate}, ${0:attr})", | 517 | insert: "cfg_attr(${1:predicate}, ${0:attr})", |
518 | kind: Attribute, | 518 | kind: Attribute, |
519 | lookup: "cfg_attr", | 519 | lookup: "cfg_attr", |
520 | }, | 520 | }, |
521 | CompletionItem { | 521 | CompletionItem { |
522 | label: "deny(…)", | 522 | label: "deny(…)", |
523 | source_range: 19..19, | 523 | source_range: 2..2, |
524 | delete: 19..19, | 524 | delete: 2..2, |
525 | insert: "deny(${0:lint})", | 525 | insert: "deny(${0:lint})", |
526 | kind: Attribute, | 526 | kind: Attribute, |
527 | lookup: "deny", | 527 | lookup: "deny", |
528 | }, | 528 | }, |
529 | CompletionItem { | 529 | CompletionItem { |
530 | label: "deprecated = \"…\"", | 530 | label: "deprecated = \"…\"", |
531 | source_range: 19..19, | 531 | source_range: 2..2, |
532 | delete: 19..19, | 532 | delete: 2..2, |
533 | insert: "deprecated = \"${0:reason}\"", | 533 | insert: "deprecated = \"${0:reason}\"", |
534 | kind: Attribute, | 534 | kind: Attribute, |
535 | lookup: "deprecated", | 535 | lookup: "deprecated", |
536 | }, | 536 | }, |
537 | CompletionItem { | 537 | CompletionItem { |
538 | label: "derive(…)", | 538 | label: "derive(…)", |
539 | source_range: 19..19, | 539 | source_range: 2..2, |
540 | delete: 19..19, | 540 | delete: 2..2, |
541 | insert: "derive(${0:Debug})", | 541 | insert: "derive(${0:Debug})", |
542 | kind: Attribute, | 542 | kind: Attribute, |
543 | lookup: "derive", | 543 | lookup: "derive", |
544 | }, | 544 | }, |
545 | CompletionItem { | 545 | CompletionItem { |
546 | label: "doc = \"…\"", | 546 | label: "doc = \"…\"", |
547 | source_range: 19..19, | 547 | source_range: 2..2, |
548 | delete: 19..19, | 548 | delete: 2..2, |
549 | insert: "doc = \"${0:docs}\"", | 549 | insert: "doc = \"${0:docs}\"", |
550 | kind: Attribute, | 550 | kind: Attribute, |
551 | lookup: "doc", | 551 | lookup: "doc", |
552 | }, | 552 | }, |
553 | CompletionItem { | 553 | CompletionItem { |
554 | label: "forbid(…)", | 554 | label: "forbid(…)", |
555 | source_range: 19..19, | 555 | source_range: 2..2, |
556 | delete: 19..19, | 556 | delete: 2..2, |
557 | insert: "forbid(${0:lint})", | 557 | insert: "forbid(${0:lint})", |
558 | kind: Attribute, | 558 | kind: Attribute, |
559 | lookup: "forbid", | 559 | lookup: "forbid", |
560 | }, | 560 | }, |
561 | CompletionItem { | 561 | CompletionItem { |
562 | label: "ignore(…)", | 562 | label: "ignore(…)", |
563 | source_range: 19..19, | 563 | source_range: 2..2, |
564 | delete: 19..19, | 564 | delete: 2..2, |
565 | insert: "ignore(${0:lint})", | 565 | insert: "ignore(${0:lint})", |
566 | kind: Attribute, | 566 | kind: Attribute, |
567 | lookup: "ignore", | 567 | lookup: "ignore", |
568 | }, | 568 | }, |
569 | CompletionItem { | 569 | CompletionItem { |
570 | label: "inline(…)", | 570 | label: "inline(…)", |
571 | source_range: 19..19, | 571 | source_range: 2..2, |
572 | delete: 19..19, | 572 | delete: 2..2, |
573 | insert: "inline(${0:lint})", | 573 | insert: "inline(${0:lint})", |
574 | kind: Attribute, | 574 | kind: Attribute, |
575 | lookup: "inline", | 575 | lookup: "inline", |
576 | }, | 576 | }, |
577 | CompletionItem { | 577 | CompletionItem { |
578 | label: "link", | 578 | label: "link", |
579 | source_range: 19..19, | 579 | source_range: 2..2, |
580 | delete: 19..19, | 580 | delete: 2..2, |
581 | insert: "link", | 581 | insert: "link", |
582 | kind: Attribute, | 582 | kind: Attribute, |
583 | }, | 583 | }, |
584 | CompletionItem { | 584 | CompletionItem { |
585 | label: "link_name = \"…\"", | 585 | label: "link_name = \"…\"", |
586 | source_range: 19..19, | 586 | source_range: 2..2, |
587 | delete: 19..19, | 587 | delete: 2..2, |
588 | insert: "link_name = \"${0:symbol_name}\"", | 588 | insert: "link_name = \"${0:symbol_name}\"", |
589 | kind: Attribute, | 589 | kind: Attribute, |
590 | lookup: "link_name", | 590 | lookup: "link_name", |
591 | }, | 591 | }, |
592 | CompletionItem { | 592 | CompletionItem { |
593 | label: "macro_export", | 593 | label: "macro_export", |
594 | source_range: 19..19, | 594 | source_range: 2..2, |
595 | delete: 19..19, | 595 | delete: 2..2, |
596 | insert: "macro_export", | 596 | insert: "macro_export", |
597 | kind: Attribute, | 597 | kind: Attribute, |
598 | }, | 598 | }, |
599 | CompletionItem { | 599 | CompletionItem { |
600 | label: "macro_use", | 600 | label: "macro_use", |
601 | source_range: 19..19, | 601 | source_range: 2..2, |
602 | delete: 19..19, | 602 | delete: 2..2, |
603 | insert: "macro_use", | 603 | insert: "macro_use", |
604 | kind: Attribute, | 604 | kind: Attribute, |
605 | }, | 605 | }, |
606 | CompletionItem { | 606 | CompletionItem { |
607 | label: "must_use = \"…\"", | 607 | label: "must_use = \"…\"", |
608 | source_range: 19..19, | 608 | source_range: 2..2, |
609 | delete: 19..19, | 609 | delete: 2..2, |
610 | insert: "must_use = \"${0:reason}\"", | 610 | insert: "must_use = \"${0:reason}\"", |
611 | kind: Attribute, | 611 | kind: Attribute, |
612 | lookup: "must_use", | 612 | lookup: "must_use", |
613 | }, | 613 | }, |
614 | CompletionItem { | 614 | CompletionItem { |
615 | label: "no_mangle", | 615 | label: "no_mangle", |
616 | source_range: 19..19, | 616 | source_range: 2..2, |
617 | delete: 19..19, | 617 | delete: 2..2, |
618 | insert: "no_mangle", | 618 | insert: "no_mangle", |
619 | kind: Attribute, | 619 | kind: Attribute, |
620 | }, | 620 | }, |
621 | CompletionItem { | 621 | CompletionItem { |
622 | label: "non_exhaustive", | 622 | label: "non_exhaustive", |
623 | source_range: 19..19, | 623 | source_range: 2..2, |
624 | delete: 19..19, | 624 | delete: 2..2, |
625 | insert: "non_exhaustive", | 625 | insert: "non_exhaustive", |
626 | kind: Attribute, | 626 | kind: Attribute, |
627 | }, | 627 | }, |
628 | CompletionItem { | 628 | CompletionItem { |
629 | label: "path = \"…\"", | 629 | label: "path = \"…\"", |
630 | source_range: 19..19, | 630 | source_range: 2..2, |
631 | delete: 19..19, | 631 | delete: 2..2, |
632 | insert: "path =\"${0:path}\"", | 632 | insert: "path =\"${0:path}\"", |
633 | kind: Attribute, | 633 | kind: Attribute, |
634 | lookup: "path", | 634 | lookup: "path", |
635 | }, | 635 | }, |
636 | CompletionItem { | 636 | CompletionItem { |
637 | label: "proc_macro", | 637 | label: "proc_macro", |
638 | source_range: 19..19, | 638 | source_range: 2..2, |
639 | delete: 19..19, | 639 | delete: 2..2, |
640 | insert: "proc_macro", | 640 | insert: "proc_macro", |
641 | kind: Attribute, | 641 | kind: Attribute, |
642 | }, | 642 | }, |
643 | CompletionItem { | 643 | CompletionItem { |
644 | label: "proc_macro_attribute", | 644 | label: "proc_macro_attribute", |
645 | source_range: 19..19, | 645 | source_range: 2..2, |
646 | delete: 19..19, | 646 | delete: 2..2, |
647 | insert: "proc_macro_attribute", | 647 | insert: "proc_macro_attribute", |
648 | kind: Attribute, | 648 | kind: Attribute, |
649 | }, | 649 | }, |
650 | CompletionItem { | 650 | CompletionItem { |
651 | label: "proc_macro_derive(…)", | 651 | label: "proc_macro_derive(…)", |
652 | source_range: 19..19, | 652 | source_range: 2..2, |
653 | delete: 19..19, | 653 | delete: 2..2, |
654 | insert: "proc_macro_derive(${0:Trait})", | 654 | insert: "proc_macro_derive(${0:Trait})", |
655 | kind: Attribute, | 655 | kind: Attribute, |
656 | lookup: "proc_macro_derive", | 656 | lookup: "proc_macro_derive", |
657 | }, | 657 | }, |
658 | CompletionItem { | 658 | CompletionItem { |
659 | label: "repr(…)", | 659 | label: "repr(…)", |
660 | source_range: 19..19, | 660 | source_range: 2..2, |
661 | delete: 19..19, | 661 | delete: 2..2, |
662 | insert: "repr(${0:C})", | 662 | insert: "repr(${0:C})", |
663 | kind: Attribute, | 663 | kind: Attribute, |
664 | lookup: "repr", | 664 | lookup: "repr", |
665 | }, | 665 | }, |
666 | CompletionItem { | 666 | CompletionItem { |
667 | label: "should_panic(…)", | 667 | label: "should_panic(…)", |
668 | source_range: 19..19, | 668 | source_range: 2..2, |
669 | delete: 19..19, | 669 | delete: 2..2, |
670 | insert: "should_panic(expected = \"${0:reason}\")", | 670 | insert: "should_panic(expected = \"${0:reason}\")", |
671 | kind: Attribute, | 671 | kind: Attribute, |
672 | lookup: "should_panic", | 672 | lookup: "should_panic", |
673 | }, | 673 | }, |
674 | CompletionItem { | 674 | CompletionItem { |
675 | label: "target_feature = \"…\"", | 675 | label: "target_feature = \"…\"", |
676 | source_range: 19..19, | 676 | source_range: 2..2, |
677 | delete: 19..19, | 677 | delete: 2..2, |
678 | insert: "target_feature = \"${0:feature}\"", | 678 | insert: "target_feature = \"${0:feature}\"", |
679 | kind: Attribute, | 679 | kind: Attribute, |
680 | lookup: "target_feature", | 680 | lookup: "target_feature", |
681 | }, | 681 | }, |
682 | CompletionItem { | 682 | CompletionItem { |
683 | label: "test", | 683 | label: "test", |
684 | source_range: 19..19, | 684 | source_range: 2..2, |
685 | delete: 19..19, | 685 | delete: 2..2, |
686 | insert: "test", | 686 | insert: "test", |
687 | kind: Attribute, | 687 | kind: Attribute, |
688 | }, | 688 | }, |
689 | CompletionItem { | 689 | CompletionItem { |
690 | label: "used", | 690 | label: "used", |
691 | source_range: 19..19, | 691 | source_range: 2..2, |
692 | delete: 19..19, | 692 | delete: 2..2, |
693 | insert: "used", | 693 | insert: "used", |
694 | kind: Attribute, | 694 | kind: Attribute, |
695 | }, | 695 | }, |
696 | CompletionItem { | 696 | CompletionItem { |
697 | label: "warn(…)", | 697 | label: "warn(…)", |
698 | source_range: 19..19, | 698 | source_range: 2..2, |
699 | delete: 19..19, | 699 | delete: 2..2, |
700 | insert: "warn(${0:lint})", | 700 | insert: "warn(${0:lint})", |
701 | kind: Attribute, | 701 | kind: Attribute, |
702 | lookup: "warn", | 702 | lookup: "warn", |
@@ -732,252 +732,252 @@ mod tests { | |||
732 | [ | 732 | [ |
733 | CompletionItem { | 733 | CompletionItem { |
734 | label: "allow(…)", | 734 | label: "allow(…)", |
735 | source_range: 20..20, | 735 | source_range: 3..3, |
736 | delete: 20..20, | 736 | delete: 3..3, |
737 | insert: "allow(${0:lint})", | 737 | insert: "allow(${0:lint})", |
738 | kind: Attribute, | 738 | kind: Attribute, |
739 | lookup: "allow", | 739 | lookup: "allow", |
740 | }, | 740 | }, |
741 | CompletionItem { | 741 | CompletionItem { |
742 | label: "cfg(…)", | 742 | label: "cfg(…)", |
743 | source_range: 20..20, | 743 | source_range: 3..3, |
744 | delete: 20..20, | 744 | delete: 3..3, |
745 | insert: "cfg(${0:predicate})", | 745 | insert: "cfg(${0:predicate})", |
746 | kind: Attribute, | 746 | kind: Attribute, |
747 | lookup: "cfg", | 747 | lookup: "cfg", |
748 | }, | 748 | }, |
749 | CompletionItem { | 749 | CompletionItem { |
750 | label: "cfg_attr(…)", | 750 | label: "cfg_attr(…)", |
751 | source_range: 20..20, | 751 | source_range: 3..3, |
752 | delete: 20..20, | 752 | delete: 3..3, |
753 | insert: "cfg_attr(${1:predicate}, ${0:attr})", | 753 | insert: "cfg_attr(${1:predicate}, ${0:attr})", |
754 | kind: Attribute, | 754 | kind: Attribute, |
755 | lookup: "cfg_attr", | 755 | lookup: "cfg_attr", |
756 | }, | 756 | }, |
757 | CompletionItem { | 757 | CompletionItem { |
758 | label: "deny(…)", | 758 | label: "deny(…)", |
759 | source_range: 20..20, | 759 | source_range: 3..3, |
760 | delete: 20..20, | 760 | delete: 3..3, |
761 | insert: "deny(${0:lint})", | 761 | insert: "deny(${0:lint})", |
762 | kind: Attribute, | 762 | kind: Attribute, |
763 | lookup: "deny", | 763 | lookup: "deny", |
764 | }, | 764 | }, |
765 | CompletionItem { | 765 | CompletionItem { |
766 | label: "deprecated = \"…\"", | 766 | label: "deprecated = \"…\"", |
767 | source_range: 20..20, | 767 | source_range: 3..3, |
768 | delete: 20..20, | 768 | delete: 3..3, |
769 | insert: "deprecated = \"${0:reason}\"", | 769 | insert: "deprecated = \"${0:reason}\"", |
770 | kind: Attribute, | 770 | kind: Attribute, |
771 | lookup: "deprecated", | 771 | lookup: "deprecated", |
772 | }, | 772 | }, |
773 | CompletionItem { | 773 | CompletionItem { |
774 | label: "derive(…)", | 774 | label: "derive(…)", |
775 | source_range: 20..20, | 775 | source_range: 3..3, |
776 | delete: 20..20, | 776 | delete: 3..3, |
777 | insert: "derive(${0:Debug})", | 777 | insert: "derive(${0:Debug})", |
778 | kind: Attribute, | 778 | kind: Attribute, |
779 | lookup: "derive", | 779 | lookup: "derive", |
780 | }, | 780 | }, |
781 | CompletionItem { | 781 | CompletionItem { |
782 | label: "doc = \"…\"", | 782 | label: "doc = \"…\"", |
783 | source_range: 20..20, | 783 | source_range: 3..3, |
784 | delete: 20..20, | 784 | delete: 3..3, |
785 | insert: "doc = \"${0:docs}\"", | 785 | insert: "doc = \"${0:docs}\"", |
786 | kind: Attribute, | 786 | kind: Attribute, |
787 | lookup: "doc", | 787 | lookup: "doc", |
788 | }, | 788 | }, |
789 | CompletionItem { | 789 | CompletionItem { |
790 | label: "feature(…)", | 790 | label: "feature(…)", |
791 | source_range: 20..20, | 791 | source_range: 3..3, |
792 | delete: 20..20, | 792 | delete: 3..3, |
793 | insert: "feature(${0:flag})", | 793 | insert: "feature(${0:flag})", |
794 | kind: Attribute, | 794 | kind: Attribute, |
795 | lookup: "feature", | 795 | lookup: "feature", |
796 | }, | 796 | }, |
797 | CompletionItem { | 797 | CompletionItem { |
798 | label: "forbid(…)", | 798 | label: "forbid(…)", |
799 | source_range: 20..20, | 799 | source_range: 3..3, |
800 | delete: 20..20, | 800 | delete: 3..3, |
801 | insert: "forbid(${0:lint})", | 801 | insert: "forbid(${0:lint})", |
802 | kind: Attribute, | 802 | kind: Attribute, |
803 | lookup: "forbid", | 803 | lookup: "forbid", |
804 | }, | 804 | }, |
805 | CompletionItem { | 805 | CompletionItem { |
806 | label: "global_allocator", | 806 | label: "global_allocator", |
807 | source_range: 20..20, | 807 | source_range: 3..3, |
808 | delete: 20..20, | 808 | delete: 3..3, |
809 | insert: "global_allocator", | 809 | insert: "global_allocator", |
810 | kind: Attribute, | 810 | kind: Attribute, |
811 | }, | 811 | }, |
812 | CompletionItem { | 812 | CompletionItem { |
813 | label: "ignore(…)", | 813 | label: "ignore(…)", |
814 | source_range: 20..20, | 814 | source_range: 3..3, |
815 | delete: 20..20, | 815 | delete: 3..3, |
816 | insert: "ignore(${0:lint})", | 816 | insert: "ignore(${0:lint})", |
817 | kind: Attribute, | 817 | kind: Attribute, |
818 | lookup: "ignore", | 818 | lookup: "ignore", |
819 | }, | 819 | }, |
820 | CompletionItem { | 820 | CompletionItem { |
821 | label: "inline(…)", | 821 | label: "inline(…)", |
822 | source_range: 20..20, | 822 | source_range: 3..3, |
823 | delete: 20..20, | 823 | delete: 3..3, |
824 | insert: "inline(${0:lint})", | 824 | insert: "inline(${0:lint})", |
825 | kind: Attribute, | 825 | kind: Attribute, |
826 | lookup: "inline", | 826 | lookup: "inline", |
827 | }, | 827 | }, |
828 | CompletionItem { | 828 | CompletionItem { |
829 | label: "link", | 829 | label: "link", |
830 | source_range: 20..20, | 830 | source_range: 3..3, |
831 | delete: 20..20, | 831 | delete: 3..3, |
832 | insert: "link", | 832 | insert: "link", |
833 | kind: Attribute, | 833 | kind: Attribute, |
834 | }, | 834 | }, |
835 | CompletionItem { | 835 | CompletionItem { |
836 | label: "link_name = \"…\"", | 836 | label: "link_name = \"…\"", |
837 | source_range: 20..20, | 837 | source_range: 3..3, |
838 | delete: 20..20, | 838 | delete: 3..3, |
839 | insert: "link_name = \"${0:symbol_name}\"", | 839 | insert: "link_name = \"${0:symbol_name}\"", |
840 | kind: Attribute, | 840 | kind: Attribute, |
841 | lookup: "link_name", | 841 | lookup: "link_name", |
842 | }, | 842 | }, |
843 | CompletionItem { | 843 | CompletionItem { |
844 | label: "macro_export", | 844 | label: "macro_export", |
845 | source_range: 20..20, | 845 | source_range: 3..3, |
846 | delete: 20..20, | 846 | delete: 3..3, |
847 | insert: "macro_export", | 847 | insert: "macro_export", |
848 | kind: Attribute, | 848 | kind: Attribute, |
849 | }, | 849 | }, |
850 | CompletionItem { | 850 | CompletionItem { |
851 | label: "macro_use", | 851 | label: "macro_use", |
852 | source_range: 20..20, | 852 | source_range: 3..3, |
853 | delete: 20..20, | 853 | delete: 3..3, |
854 | insert: "macro_use", | 854 | insert: "macro_use", |
855 | kind: Attribute, | 855 | kind: Attribute, |
856 | }, | 856 | }, |
857 | CompletionItem { | 857 | CompletionItem { |
858 | label: "must_use = \"…\"", | 858 | label: "must_use = \"…\"", |
859 | source_range: 20..20, | 859 | source_range: 3..3, |
860 | delete: 20..20, | 860 | delete: 3..3, |
861 | insert: "must_use = \"${0:reason}\"", | 861 | insert: "must_use = \"${0:reason}\"", |
862 | kind: Attribute, | 862 | kind: Attribute, |
863 | lookup: "must_use", | 863 | lookup: "must_use", |
864 | }, | 864 | }, |
865 | CompletionItem { | 865 | CompletionItem { |
866 | label: "no_mangle", | 866 | label: "no_mangle", |
867 | source_range: 20..20, | 867 | source_range: 3..3, |
868 | delete: 20..20, | 868 | delete: 3..3, |
869 | insert: "no_mangle", | 869 | insert: "no_mangle", |
870 | kind: Attribute, | 870 | kind: Attribute, |
871 | }, | 871 | }, |
872 | CompletionItem { | 872 | CompletionItem { |
873 | label: "no_std", | 873 | label: "no_std", |
874 | source_range: 20..20, | 874 | source_range: 3..3, |
875 | delete: 20..20, | 875 | delete: 3..3, |
876 | insert: "no_std", | 876 | insert: "no_std", |
877 | kind: Attribute, | 877 | kind: Attribute, |
878 | }, | 878 | }, |
879 | CompletionItem { | 879 | CompletionItem { |
880 | label: "non_exhaustive", | 880 | label: "non_exhaustive", |
881 | source_range: 20..20, | 881 | source_range: 3..3, |
882 | delete: 20..20, | 882 | delete: 3..3, |
883 | insert: "non_exhaustive", | 883 | insert: "non_exhaustive", |
884 | kind: Attribute, | 884 | kind: Attribute, |
885 | }, | 885 | }, |
886 | CompletionItem { | 886 | CompletionItem { |
887 | label: "panic_handler", | 887 | label: "panic_handler", |
888 | source_range: 20..20, | 888 | source_range: 3..3, |
889 | delete: 20..20, | 889 | delete: 3..3, |
890 | insert: "panic_handler", | 890 | insert: "panic_handler", |
891 | kind: Attribute, | 891 | kind: Attribute, |
892 | }, | 892 | }, |
893 | CompletionItem { | 893 | CompletionItem { |
894 | label: "path = \"…\"", | 894 | label: "path = \"…\"", |
895 | source_range: 20..20, | 895 | source_range: 3..3, |
896 | delete: 20..20, | 896 | delete: 3..3, |
897 | insert: "path =\"${0:path}\"", | 897 | insert: "path =\"${0:path}\"", |
898 | kind: Attribute, | 898 | kind: Attribute, |
899 | lookup: "path", | 899 | lookup: "path", |
900 | }, | 900 | }, |
901 | CompletionItem { | 901 | CompletionItem { |
902 | label: "proc_macro", | 902 | label: "proc_macro", |
903 | source_range: 20..20, | 903 | source_range: 3..3, |
904 | delete: 20..20, | 904 | delete: 3..3, |
905 | insert: "proc_macro", | 905 | insert: "proc_macro", |
906 | kind: Attribute, | 906 | kind: Attribute, |
907 | }, | 907 | }, |
908 | CompletionItem { | 908 | CompletionItem { |
909 | label: "proc_macro_attribute", | 909 | label: "proc_macro_attribute", |
910 | source_range: 20..20, | 910 | source_range: 3..3, |
911 | delete: 20..20, | 911 | delete: 3..3, |
912 | insert: "proc_macro_attribute", | 912 | insert: "proc_macro_attribute", |
913 | kind: Attribute, | 913 | kind: Attribute, |
914 | }, | 914 | }, |
915 | CompletionItem { | 915 | CompletionItem { |
916 | label: "proc_macro_derive(…)", | 916 | label: "proc_macro_derive(…)", |
917 | source_range: 20..20, | 917 | source_range: 3..3, |
918 | delete: 20..20, | 918 | delete: 3..3, |
919 | insert: "proc_macro_derive(${0:Trait})", | 919 | insert: "proc_macro_derive(${0:Trait})", |
920 | kind: Attribute, | 920 | kind: Attribute, |
921 | lookup: "proc_macro_derive", | 921 | lookup: "proc_macro_derive", |
922 | }, | 922 | }, |
923 | CompletionItem { | 923 | CompletionItem { |
924 | label: "recursion_limit = …", | 924 | label: "recursion_limit = …", |
925 | source_range: 20..20, | 925 | source_range: 3..3, |
926 | delete: 20..20, | 926 | delete: 3..3, |
927 | insert: "recursion_limit = ${0:128}", | 927 | insert: "recursion_limit = ${0:128}", |
928 | kind: Attribute, | 928 | kind: Attribute, |
929 | lookup: "recursion_limit", | 929 | lookup: "recursion_limit", |
930 | }, | 930 | }, |
931 | CompletionItem { | 931 | CompletionItem { |
932 | label: "repr(…)", | 932 | label: "repr(…)", |
933 | source_range: 20..20, | 933 | source_range: 3..3, |
934 | delete: 20..20, | 934 | delete: 3..3, |
935 | insert: "repr(${0:C})", | 935 | insert: "repr(${0:C})", |
936 | kind: Attribute, | 936 | kind: Attribute, |
937 | lookup: "repr", | 937 | lookup: "repr", |
938 | }, | 938 | }, |
939 | CompletionItem { | 939 | CompletionItem { |
940 | label: "should_panic(…)", | 940 | label: "should_panic(…)", |
941 | source_range: 20..20, | 941 | source_range: 3..3, |
942 | delete: 20..20, | 942 | delete: 3..3, |
943 | insert: "should_panic(expected = \"${0:reason}\")", | 943 | insert: "should_panic(expected = \"${0:reason}\")", |
944 | kind: Attribute, | 944 | kind: Attribute, |
945 | lookup: "should_panic", | 945 | lookup: "should_panic", |
946 | }, | 946 | }, |
947 | CompletionItem { | 947 | CompletionItem { |
948 | label: "target_feature = \"…\"", | 948 | label: "target_feature = \"…\"", |
949 | source_range: 20..20, | 949 | source_range: 3..3, |
950 | delete: 20..20, | 950 | delete: 3..3, |
951 | insert: "target_feature = \"${0:feature}\"", | 951 | insert: "target_feature = \"${0:feature}\"", |
952 | kind: Attribute, | 952 | kind: Attribute, |
953 | lookup: "target_feature", | 953 | lookup: "target_feature", |
954 | }, | 954 | }, |
955 | CompletionItem { | 955 | CompletionItem { |
956 | label: "test", | 956 | label: "test", |
957 | source_range: 20..20, | 957 | source_range: 3..3, |
958 | delete: 20..20, | 958 | delete: 3..3, |
959 | insert: "test", | 959 | insert: "test", |
960 | kind: Attribute, | 960 | kind: Attribute, |
961 | }, | 961 | }, |
962 | CompletionItem { | 962 | CompletionItem { |
963 | label: "used", | 963 | label: "used", |
964 | source_range: 20..20, | 964 | source_range: 3..3, |
965 | delete: 20..20, | 965 | delete: 3..3, |
966 | insert: "used", | 966 | insert: "used", |
967 | kind: Attribute, | 967 | kind: Attribute, |
968 | }, | 968 | }, |
969 | CompletionItem { | 969 | CompletionItem { |
970 | label: "warn(…)", | 970 | label: "warn(…)", |
971 | source_range: 20..20, | 971 | source_range: 3..3, |
972 | delete: 20..20, | 972 | delete: 3..3, |
973 | insert: "warn(${0:lint})", | 973 | insert: "warn(${0:lint})", |
974 | kind: Attribute, | 974 | kind: Attribute, |
975 | lookup: "warn", | 975 | lookup: "warn", |
976 | }, | 976 | }, |
977 | CompletionItem { | 977 | CompletionItem { |
978 | label: "windows_subsystem = \"…\"", | 978 | label: "windows_subsystem = \"…\"", |
979 | source_range: 20..20, | 979 | source_range: 3..3, |
980 | delete: 20..20, | 980 | delete: 3..3, |
981 | insert: "windows_subsystem = \"${0:subsystem}\"", | 981 | insert: "windows_subsystem = \"${0:subsystem}\"", |
982 | kind: Attribute, | 982 | kind: Attribute, |
983 | lookup: "windows_subsystem", | 983 | lookup: "windows_subsystem", |