@@ -1442,3 +1442,75 @@ struct S (
1442
1442
// ^ meta.struct punctuation.definition.group.end
1443
1443
// ^^^ meta.struct storage.type
1444
1444
) ;
1445
+
1446
+ // Various tests on `where`.
1447
+ fn f<' b: ' a>( self ) -> & ' b mut [ i32 ] where ' a: ' b { }
1448
+ // ^^^^^^^^^^^^^^ meta.function meta.function.return-type
1449
+ // ^ meta.function meta.function.return-type punctuation.definition.group.begin
1450
+ // ^^^ meta.function meta.function.return-type storage.type
1451
+ // ^ meta.function meta.function.return-type punctuation.definition.group.end
1452
+ // ^^^^^ meta.function meta.where keyword.other
1453
+ // ^^ meta.function meta.where storage.modifier.lifetime
1454
+ // ^ meta.function meta.where punctuation.separator
1455
+ // ^^ meta.function meta.where storage.modifier.lifetime
1456
+ // ^ meta.function meta.block punctuation.definition.block.begin
1457
+ // ^ meta.function meta.block punctuation.definition.block.end
1458
+
1459
+ fn f<F >( func: F ) -> usize
1460
+ // ^^ meta.function meta.function.return-type punctuation.separator
1461
+ // ^^^^^ meta.function meta.function.return-type storage.type
1462
+ where F : Fn ( usize ) -> usize { }
1463
+ // ^^^^^ meta.function meta.where keyword.other
1464
+ // ^^^^^^^^^^^^^^^^^^^^^ meta.function meta.where
1465
+ // ^ punctuation.separator
1466
+ // ^^ support.type
1467
+ // ^ punctuation.definition.type.begin
1468
+ // ^^^^^ storage.type
1469
+ // ^ punctuation.definition.type.end
1470
+ // ^^ meta.function.return-type punctuation.separator
1471
+ // ^^^^^ meta.function.return-type storage.type
1472
+ // ^ meta.function meta.block punctuation.definition.block.begin
1473
+ // ^ meta.function meta.block punctuation.definition.block.end
1474
+
1475
+ fn f<L , R >( lhs: L , rhs: R )
1476
+ where L : IntoIterator <Item =( & ' a i32 , & ' a i32 ) >,
1477
+ // ^^^^^ meta.function meta.where keyword.other
1478
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function meta.where
1479
+ // ^^^^^^^^^^^^ support.type
1480
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^ meta.generic
1481
+ // ^ punctuation.definition.generic.begin
1482
+ // ^ punctuation.definition.type.begin
1483
+ // ^ keyword.operator
1484
+ // ^^ storage.modifier.lifetime
1485
+ // ^^^ storage.type
1486
+ // ^ keyword.operator
1487
+ // ^^ storage.modifier.lifetime
1488
+ // ^^^ storage.type
1489
+ // ^ punctuation.definition.type.end
1490
+ // ^ punctuation.definition.generic.end
1491
+ R : IntoIterator <Item =( & ' a i32 , & ' a i32 ) >, { }
1492
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function meta.where
1493
+ // ^ meta.function meta.block punctuation.definition.block.begin
1494
+ // ^ meta.function meta.block punctuation.definition.block.end
1495
+ fn f<F : Fn ( usize ) -> usize >( func: f) { }
1496
+ // ^^^^^^^^^^^^^^^^^^^^^^^ meta.generic
1497
+ // ^ meta.generic punctuation.definition.generic.begin
1498
+ // ^ meta.generic punctuation.separator
1499
+ // ^^ meta.generic support.type
1500
+ // ^ meta.generic punctuation.definition.type.begin
1501
+ // ^^^^^ meta.generic storage.type
1502
+ // ^ meta.generic punctuation.definition.type.end
1503
+ // ^^^^^ meta.generic meta.function.return-type storage.type
1504
+ // ^ meta.generic punctuation.definition.generic.end
1505
+ // ^ meta.function meta.function.parameters punctuation.definition.parameters.begin
1506
+ // ^^^^ meta.function meta.function.parameters variable.parameter
1507
+ fn f<L : IntoIterator <Item =( & ' a i32 , & ' a i32 ) >>( lhs: L ) { }
1508
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.generic
1509
+ // ^ punctuation.definition.generic.begin
1510
+ // ^ punctuation.definition.generic.begin
1511
+ // ^ punctuation.definition.type.begin
1512
+ // ^^ storage.modifier.lifetime
1513
+ // ^^^ storage.type
1514
+ // ^ punctuation.definition.generic.begin
1515
+ // ^ punctuation.definition.generic.end
1516
+ // ^ meta.function meta.function.parameters punctuation.definition.parameters.begin
0 commit comments