@@ -439,8 +439,94 @@ fn function<const N: u16>() {
439
439
// ^^^ storage.type.numeric
440
440
let b: Byte < b'a' > ;
441
441
// ^^^^^^ meta.function meta.block meta.generic
442
- // ^^^^ string.quoted.single.rust
442
+ // ^^^^ string.quoted.single
443
443
// ^ storage.type.string
444
444
// ^ punctuation.definition.string.begin
445
445
// ^ punctuation.definition.string.end
446
446
}
447
+
448
+ fn impl_trait_return_use_bound < ' a > ( ) -> impl for < ' b > Trait1 < Item = impl Trait2 < ' a > + use < ' a > > { }
449
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function meta.function.return-type
450
+ // ^^ punctuation.separator
451
+ // ^^^^ storage.type.impl
452
+ // ^^^ keyword.other
453
+ // ^ meta.generic punctuation.definition.generic.begin
454
+ // ^ meta.generic punctuation.definition.generic.end
455
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.generic
456
+ // ^ meta.generic punctuation.definition.generic.begin
457
+ // ^ meta.generic keyword.operator
458
+ // ^^^^ meta.generic storage.type.impl
459
+ // ^^^^^^^^^^ meta.generic meta.generic
460
+ // ^ punctuation.definition.generic.begin
461
+ // ^^ storage.modifier.lifetime
462
+ // ^ punctuation.definition.generic.end
463
+ // ^ keyword.operator
464
+ // ^^^^^^^ meta.generic meta.generic
465
+ // ^ punctuation.definition.generic.begin
466
+ // ^^ storage.modifier.lifetime
467
+ // ^ punctuation.definition.generic.end
468
+ // ^ punctuation.definition.generic.end
469
+
470
+ fn impl_trait_use < ' a , foo > ( ) -> impl Trait1 + use < ' a , Self , foo > { }
471
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function meta.function.return-type
472
+ // ^^^^^^^^^^^^^^^^^^ meta.generic
473
+ // ^ punctuation.definition.generic.begin
474
+ // ^^ storage.modifier.lifetime
475
+ // ^ punctuation.separator
476
+ // ^^^^ storage.type
477
+ // ^ punctuation.separator
478
+ // ^ punctuation.definition.generic.end
479
+
480
+ fn impl_trait_return1 < ' a , ' b > ( ) -> impl Trait < & ' a u8 , Ty = impl Sized + ' b > { }
481
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function meta.function.return-type
482
+ // ^^ punctuation.separator
483
+ // ^^^^ storage.type.impl
484
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.generic
485
+ // ^ punctuation.definition.generic.begin
486
+ // ^ keyword.operator
487
+ // ^^ storage.modifier.lifetime
488
+ // ^^ storage.type
489
+ // ^ punctuation.separator
490
+ // ^ keyword.operator
491
+ // ^^^^ storage.type.impl
492
+ // ^^^^^ support.type
493
+ // ^ keyword.operator
494
+ // ^^ storage.modifier.lifetime
495
+ // ^ punctuation.definition.generic.end
496
+ fn impl_trait_return2 ( ) -> impl Debug + ' a { }
497
+ // ^^^^^^^^^^^^^^^^^^ meta.function meta.function.return-type
498
+ // ^^^^ storage.type.impl
499
+ // ^ keyword.operator
500
+ // ^^ storage.modifier.lifetime
501
+
502
+ fn impl_trait_param ( x : impl FnOnce ( & [ u8 ] ) -> & [ u8 ] ) { }
503
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function meta.function.parameters
504
+ // ^^^^ storage.type.impl
505
+ // ^^^^^^ support.type
506
+ // ^ meta.group punctuation.section.group.begin
507
+ // ^ meta.group keyword.operator
508
+ // ^ meta.group punctuation.section.group.begin
509
+ // ^^ meta.group storage.type
510
+ // ^^ meta.group punctuation.section.group.end
511
+ // ^^^^^^^^ meta.function meta.function.parameters meta.function.return-type
512
+ // ^^ punctuation.separator
513
+ // ^ meta.function.parameters keyword.operator
514
+ // ^ meta.function.parameters punctuation.section.group.begin
515
+ // ^^ meta.function.parameters storage.type
516
+ // ^ meta.function.parameters punctuation.section.group.end
517
+
518
+
519
+ fn impl_trait_with_plus ( ) -> impl Iterator < Item = hir:: GenericParam < ' hir > > + Captures < ' a > + Captures < ' s > { }
520
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function meta.function.return-type
521
+ // ^^^^ storage.type.impl
522
+ // ^^^^^^^^ support.type
523
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.generic
524
+ // ^ keyword.operator
525
+ // ^^^^ storage.modifier.lifetime
526
+ // ^ keyword.operator
527
+ // ^^^^^^^^^^^^ meta.generic
528
+ // ^^ storage.modifier.lifetime
529
+ // ^ keyword.operator
530
+ // ^^^^^^^^^^^^ meta.generic
531
+ // ^^ storage.modifier.lifetime
532
+
0 commit comments