@@ -1091,7 +1091,6 @@ impl LinkCollector<'_, '_> {
10911091 // resolutions are cached, for other links we want to report an error every
10921092 // time so they are not cached.
10931093 matches ! ( ori_link. kind, LinkType :: Reference | LinkType :: Shortcut ) ,
1094- false ,
10951094 ) ?;
10961095
10971096 if resolved. len ( ) > 1 {
@@ -1404,17 +1403,14 @@ impl LinkCollector<'_, '_> {
14041403 // If errors are cached then they are only reported on first occurrence
14051404 // which we want in some cases but not in others.
14061405 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 ,
14101406 ) -> Option < Vec < ( Res , Option < UrlFragment > ) > > {
14111407 if let Some ( res) = self . visited_links . get ( & key) {
14121408 if res. is_some ( ) || cache_errors {
14131409 return res. clone ( ) . map ( |r| vec ! [ r] ) ;
14141410 }
14151411 }
14161412
1417- let mut candidates = self . resolve_with_disambiguator ( & key, diag. clone ( ) , recoverable ) ;
1413+ let mut candidates = self . resolve_with_disambiguator ( & key, diag. clone ( ) ) ;
14181414
14191415 // FIXME: it would be nice to check that the feature gate was enabled in the original crate, not just ignore it altogether.
14201416 // However I'm not sure how to check that across crates.
@@ -1463,14 +1459,10 @@ impl LinkCollector<'_, '_> {
14631459 }
14641460
14651461 /// After parsing the disambiguator, resolve the main part of the link.
1466- // FIXME(jynelson): wow this is just so much
14671462 fn resolve_with_disambiguator (
14681463 & mut self ,
14691464 key : & ResolutionInfo ,
14701465 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 ,
14741466 ) -> Vec < ( Res , Option < DefId > ) > {
14751467 let disambiguator = key. dis ;
14761468 let path_str = & key. path_str ;
@@ -1500,9 +1492,7 @@ impl LinkCollector<'_, '_> {
15001492 }
15011493 }
15021494 }
1503- if !recoverable {
1504- resolution_failure ( self , diag, path_str, disambiguator, smallvec ! [ err] ) ;
1505- }
1495+ resolution_failure ( self , diag, path_str, disambiguator, smallvec ! [ err] ) ;
15061496 return vec ! [ ] ;
15071497 }
15081498 }
@@ -1539,15 +1529,13 @@ impl LinkCollector<'_, '_> {
15391529 . fold ( 0 , |acc, res| if let Ok ( res) = res { acc + res. len ( ) } else { acc } ) ;
15401530
15411531 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+ ) ;
15511539 return vec ! [ ] ;
15521540 } else if len == 1 {
15531541 candidates. into_iter ( ) . filter_map ( |res| res. ok ( ) ) . flatten ( ) . collect :: < Vec < _ > > ( )
0 commit comments