@@ -439,8 +439,95 @@ 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
465
+ // ^^^ keyword.other
466
+ // ^ punctuation.definition.generic.begin
467
+ // ^^ storage.modifier.lifetime
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
+ // ^ keyword.operator
473
+ // ^^^ keyword.other
474
+ // ^ punctuation.definition.generic.begin
475
+ // ^^ storage.modifier.lifetime
476
+ // ^ punctuation.separator
477
+ // ^^^^ keyword.other
478
+ // ^ punctuation.separator
479
+ // ^ punctuation.definition.generic.end
480
+
481
+ fn impl_trait_return1 < ' a , ' b > ( ) -> impl Trait < & ' a u8 , Ty = impl Sized + ' b > { }
482
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function meta.function.return-type
483
+ // ^^ punctuation.separator
484
+ // ^^^^ storage.type.impl
485
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.generic
486
+ // ^ punctuation.definition.generic.begin
487
+ // ^ keyword.operator
488
+ // ^^ storage.modifier.lifetime
489
+ // ^^ storage.type
490
+ // ^ punctuation.separator
491
+ // ^ keyword.operator
492
+ // ^^^^ storage.type.impl
493
+ // ^^^^^ support.type
494
+ // ^ keyword.operator
495
+ // ^^ storage.modifier.lifetime
496
+ // ^ punctuation.definition.generic.end
497
+ fn impl_trait_return2 ( ) -> impl Debug + ' a { }
498
+ // ^^^^^^^^^^^^^^^^^^ meta.function meta.function.return-type
499
+ // ^^^^ storage.type.impl
500
+ // ^ keyword.operator
501
+ // ^^ storage.modifier.lifetime
502
+
503
+ fn impl_trait_param ( x : impl FnOnce ( & [ u8 ] ) -> & [ u8 ] ) { }
504
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function meta.function.parameters
505
+ // ^^^^ storage.type.impl
506
+ // ^^^^^^ support.type
507
+ // ^ meta.group punctuation.section.group.begin
508
+ // ^ meta.group keyword.operator
509
+ // ^ meta.group punctuation.section.group.begin
510
+ // ^^ meta.group storage.type
511
+ // ^^ meta.group punctuation.section.group.end
512
+ // ^^^^^^^^ meta.function meta.function.parameters meta.function.return-type
513
+ // ^^ punctuation.separator
514
+ // ^ meta.function.parameters keyword.operator
515
+ // ^ meta.function.parameters punctuation.section.group.begin
516
+ // ^^ meta.function.parameters storage.type
517
+ // ^ meta.function.parameters punctuation.section.group.end
518
+
519
+
520
+ fn impl_trait_with_plus ( ) -> impl Iterator < Item = hir:: GenericParam < ' hir > > + Captures < ' a > + Captures < ' s > { }
521
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function meta.function.return-type
522
+ // ^^^^ storage.type.impl
523
+ // ^^^^^^^^ support.type
524
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.generic
525
+ // ^ keyword.operator
526
+ // ^^^^ storage.modifier.lifetime
527
+ // ^ keyword.operator
528
+ // ^^^^^^^^^^^^ meta.generic
529
+ // ^^ storage.modifier.lifetime
530
+ // ^ keyword.operator
531
+ // ^^^^^^^^^^^^ meta.generic
532
+ // ^^ storage.modifier.lifetime
533
+
0 commit comments