@@ -1407,12 +1407,11 @@ fn foo() { let bar = Ba<|>r; }
1407
1407
#[ test]
1408
1408
fn test_hover_path_link ( ) {
1409
1409
check (
1410
- r"
1411
- //- /lib.rs
1412
- pub struct Foo;
1413
- /// [Foo](struct.Foo.html)
1414
- pub struct B<|>ar
1415
- " ,
1410
+ r#"
1411
+ pub struct Foo;
1412
+ /// [Foo](struct.Foo.html)
1413
+ pub struct B<|>ar
1414
+ "# ,
1416
1415
expect ! [ [ r#"
1417
1416
*Bar*
1418
1417
@@ -1434,12 +1433,11 @@ fn foo() { let bar = Ba<|>r; }
1434
1433
#[ test]
1435
1434
fn test_hover_path_link_no_strip ( ) {
1436
1435
check (
1437
- r"
1438
- //- /lib.rs
1439
- pub struct Foo;
1440
- /// [struct Foo](struct.Foo.html)
1441
- pub struct B<|>ar
1442
- " ,
1436
+ r#"
1437
+ pub struct Foo;
1438
+ /// [struct Foo](struct.Foo.html)
1439
+ pub struct B<|>ar
1440
+ "# ,
1443
1441
expect ! [ [ r#"
1444
1442
*Bar*
1445
1443
@@ -1462,14 +1460,13 @@ fn foo() { let bar = Ba<|>r; }
1462
1460
#[ test]
1463
1461
fn test_hover_path_link_field ( ) {
1464
1462
check (
1465
- r"
1466
- //- /lib.rs
1467
- pub struct Foo;
1468
- pub struct Bar {
1469
- /// [Foo](struct.Foo.html)
1470
- fie<|>ld: ()
1471
- }
1472
- " ,
1463
+ r#"
1464
+ pub struct Foo;
1465
+ pub struct Bar {
1466
+ /// [Foo](struct.Foo.html)
1467
+ fie<|>ld: ()
1468
+ }
1469
+ "# ,
1473
1470
expect ! [ [ r#"
1474
1471
*field*
1475
1472
@@ -1491,14 +1488,13 @@ fn foo() { let bar = Ba<|>r; }
1491
1488
#[ test]
1492
1489
fn test_hover_intra_link ( ) {
1493
1490
check (
1494
- r"
1495
- //- /lib.rs
1496
- pub mod foo {
1497
- pub struct Foo;
1498
- }
1499
- /// [Foo](foo::Foo)
1500
- pub struct B<|>ar
1501
- " ,
1491
+ r#"
1492
+ pub mod foo {
1493
+ pub struct Foo;
1494
+ }
1495
+ /// [Foo](foo::Foo)
1496
+ pub struct B<|>ar
1497
+ "# ,
1502
1498
expect ! [ [ r#"
1503
1499
*Bar*
1504
1500
@@ -1521,16 +1517,14 @@ fn foo() { let bar = Ba<|>r; }
1521
1517
fn test_hover_intra_link_html_root_url ( ) {
1522
1518
check (
1523
1519
r#"
1524
- //- /lib.rs
1525
-
1526
- #![doc(arbitrary_attribute = "test", html_root_url = "https:/example.com", arbitrary_attribute2)]
1520
+ #![doc(arbitrary_attribute = "test", html_root_url = "https:/example.com", arbitrary_attribute2)]
1527
1521
1528
- pub mod foo {
1529
- pub struct Foo;
1530
- }
1531
- /// [Foo](foo::Foo)
1532
- pub struct B<|>ar
1533
- "#,
1522
+ pub mod foo {
1523
+ pub struct Foo;
1524
+ }
1525
+ /// [Foo](foo::Foo)
1526
+ pub struct B<|>ar
1527
+ "# ,
1534
1528
expect ! [ [ r#"
1535
1529
*Bar*
1536
1530
@@ -1552,12 +1546,11 @@ fn foo() { let bar = Ba<|>r; }
1552
1546
#[ test]
1553
1547
fn test_hover_intra_link_shortlink ( ) {
1554
1548
check (
1555
- r"
1556
- //- /lib.rs
1557
- pub struct Foo;
1558
- /// [Foo]
1559
- pub struct B<|>ar
1560
- " ,
1549
+ r#"
1550
+ pub struct Foo;
1551
+ /// [Foo]
1552
+ pub struct B<|>ar
1553
+ "# ,
1561
1554
expect ! [ [ r#"
1562
1555
*Bar*
1563
1556
@@ -1579,12 +1572,11 @@ fn foo() { let bar = Ba<|>r; }
1579
1572
#[ test]
1580
1573
fn test_hover_intra_link_shortlink_code ( ) {
1581
1574
check (
1582
- r"
1583
- //- /lib.rs
1584
- pub struct Foo;
1585
- /// [`Foo`]
1586
- pub struct B<|>ar
1587
- " ,
1575
+ r#"
1576
+ pub struct Foo;
1577
+ /// [`Foo`]
1578
+ pub struct B<|>ar
1579
+ "# ,
1588
1580
expect ! [ [ r#"
1589
1581
*Bar*
1590
1582
@@ -1606,13 +1598,12 @@ fn foo() { let bar = Ba<|>r; }
1606
1598
#[ test]
1607
1599
fn test_hover_intra_link_namespaced ( ) {
1608
1600
check (
1609
- r"
1610
- //- /lib.rs
1611
- pub struct Foo;
1612
- fn Foo() {}
1613
- /// [Foo()]
1614
- pub struct B<|>ar
1615
- " ,
1601
+ r#"
1602
+ pub struct Foo;
1603
+ fn Foo() {}
1604
+ /// [Foo()]
1605
+ pub struct B<|>ar
1606
+ "# ,
1616
1607
expect ! [ [ r#"
1617
1608
*Bar*
1618
1609
@@ -1634,12 +1625,11 @@ fn foo() { let bar = Ba<|>r; }
1634
1625
#[ test]
1635
1626
fn test_hover_intra_link_shortlink_namspaced_code ( ) {
1636
1627
check (
1637
- r"
1638
- //- /lib.rs
1639
- pub struct Foo;
1640
- /// [`struct Foo`]
1641
- pub struct B<|>ar
1642
- " ,
1628
+ r#"
1629
+ pub struct Foo;
1630
+ /// [`struct Foo`]
1631
+ pub struct B<|>ar
1632
+ "# ,
1643
1633
expect ! [ [ r#"
1644
1634
*Bar*
1645
1635
@@ -1661,12 +1651,11 @@ fn foo() { let bar = Ba<|>r; }
1661
1651
#[ test]
1662
1652
fn test_hover_intra_link_shortlink_namspaced_code_with_at ( ) {
1663
1653
check (
1664
- r"
1665
- //- /lib.rs
1666
- pub struct Foo;
1667
- /// [`struct@Foo`]
1668
- pub struct B<|>ar
1669
- " ,
1654
+ r#"
1655
+ pub struct Foo;
1656
+ /// [`struct@Foo`]
1657
+ pub struct B<|>ar
1658
+ "# ,
1670
1659
expect ! [ [ r#"
1671
1660
*Bar*
1672
1661
@@ -1688,14 +1677,13 @@ fn foo() { let bar = Ba<|>r; }
1688
1677
#[ test]
1689
1678
fn test_hover_intra_link_reference ( ) {
1690
1679
check (
1691
- r"
1692
- //- /lib.rs
1693
- pub struct Foo;
1694
- /// [my Foo][foo]
1695
- ///
1696
- /// [foo]: Foo
1697
- pub struct B<|>ar
1698
- " ,
1680
+ r#"
1681
+ pub struct Foo;
1682
+ /// [my Foo][foo]
1683
+ ///
1684
+ /// [foo]: Foo
1685
+ pub struct B<|>ar
1686
+ "# ,
1699
1687
expect ! [ [ r#"
1700
1688
*Bar*
1701
1689
@@ -1717,12 +1705,11 @@ fn foo() { let bar = Ba<|>r; }
1717
1705
#[ test]
1718
1706
fn test_hover_external_url ( ) {
1719
1707
check (
1720
- r"
1721
- //- /lib.rs
1722
- pub struct Foo;
1723
- /// [external](https://www.google.com)
1724
- pub struct B<|>ar
1725
- " ,
1708
+ r#"
1709
+ pub struct Foo;
1710
+ /// [external](https://www.google.com)
1711
+ pub struct B<|>ar
1712
+ "# ,
1726
1713
expect ! [ [ r#"
1727
1714
*Bar*
1728
1715
@@ -1745,12 +1732,11 @@ fn foo() { let bar = Ba<|>r; }
1745
1732
#[ test]
1746
1733
fn test_hover_unknown_target ( ) {
1747
1734
check (
1748
- r"
1749
- //- /lib.rs
1750
- pub struct Foo;
1751
- /// [baz](Baz)
1752
- pub struct B<|>ar
1753
- " ,
1735
+ r#"
1736
+ pub struct Foo;
1737
+ /// [baz](Baz)
1738
+ pub struct B<|>ar
1739
+ "# ,
1754
1740
expect ! [ [ r#"
1755
1741
*Bar*
1756
1742
0 commit comments