@@ -1091,7 +1091,6 @@ impl LinkCollector<'_, '_> {
1091
1091
// resolutions are cached, for other links we want to report an error every
1092
1092
// time so they are not cached.
1093
1093
matches ! ( ori_link. kind, LinkType :: Reference | LinkType :: Shortcut ) ,
1094
- false ,
1095
1094
) ?;
1096
1095
1097
1096
if resolved. len ( ) > 1 {
@@ -1404,17 +1403,14 @@ impl LinkCollector<'_, '_> {
1404
1403
// If errors are cached then they are only reported on first occurrence
1405
1404
// which we want in some cases but not in others.
1406
1405
cache_errors : bool ,
1407
- // If this call is intended to be recoverable, then pass true to silence.
1408
- // This is only recoverable when path is failed to resolved.
1409
- recoverable : bool ,
1410
1406
) -> Option < Vec < ( Res , Option < UrlFragment > ) > > {
1411
1407
if let Some ( res) = self . visited_links . get ( & key) {
1412
1408
if res. is_some ( ) || cache_errors {
1413
1409
return res. clone ( ) . map ( |r| vec ! [ r] ) ;
1414
1410
}
1415
1411
}
1416
1412
1417
- let mut candidates = self . resolve_with_disambiguator ( & key, diag. clone ( ) , recoverable ) ;
1413
+ let mut candidates = self . resolve_with_disambiguator ( & key, diag. clone ( ) ) ;
1418
1414
1419
1415
// FIXME: it would be nice to check that the feature gate was enabled in the original crate, not just ignore it altogether.
1420
1416
// However I'm not sure how to check that across crates.
@@ -1463,14 +1459,10 @@ impl LinkCollector<'_, '_> {
1463
1459
}
1464
1460
1465
1461
/// After parsing the disambiguator, resolve the main part of the link.
1466
- // FIXME(jynelson): wow this is just so much
1467
1462
fn resolve_with_disambiguator (
1468
1463
& mut self ,
1469
1464
key : & ResolutionInfo ,
1470
1465
diag : DiagnosticInfo < ' _ > ,
1471
- // If this call is intended to be recoverable, then pass true to silence.
1472
- // This is only recoverable when path is failed to resolved.
1473
- recoverable : bool ,
1474
1466
) -> Vec < ( Res , Option < DefId > ) > {
1475
1467
let disambiguator = key. dis ;
1476
1468
let path_str = & key. path_str ;
@@ -1500,9 +1492,7 @@ impl LinkCollector<'_, '_> {
1500
1492
}
1501
1493
}
1502
1494
}
1503
- if !recoverable {
1504
- resolution_failure ( self , diag, path_str, disambiguator, smallvec ! [ err] ) ;
1505
- }
1495
+ resolution_failure ( self , diag, path_str, disambiguator, smallvec ! [ err] ) ;
1506
1496
return vec ! [ ] ;
1507
1497
}
1508
1498
}
@@ -1539,15 +1529,13 @@ impl LinkCollector<'_, '_> {
1539
1529
. fold ( 0 , |acc, res| if let Ok ( res) = res { acc + res. len ( ) } else { acc } ) ;
1540
1530
1541
1531
if len == 0 {
1542
- if !recoverable {
1543
- resolution_failure (
1544
- self ,
1545
- diag,
1546
- path_str,
1547
- disambiguator,
1548
- candidates. into_iter ( ) . filter_map ( |res| res. err ( ) ) . collect ( ) ,
1549
- ) ;
1550
- }
1532
+ resolution_failure (
1533
+ self ,
1534
+ diag,
1535
+ path_str,
1536
+ disambiguator,
1537
+ candidates. into_iter ( ) . filter_map ( |res| res. err ( ) ) . collect ( ) ,
1538
+ ) ;
1551
1539
return vec ! [ ] ;
1552
1540
} else if len == 1 {
1553
1541
candidates. into_iter ( ) . filter_map ( |res| res. ok ( ) ) . flatten ( ) . collect :: < Vec < _ > > ( )
0 commit comments