@@ -779,7 +779,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
779779 // All of these are valid, so do nothing
780780 => { }
781781 ( actual, Some ( Disambiguator :: Kind ( expected) ) ) if actual == expected => { }
782- ( _, Some ( expected) ) => {
782+ ( _, Some ( Disambiguator :: Kind ( expected) ) ) => {
783783 // The resolved item did not match the disambiguator; give a better error than 'not found'
784784 let msg = format ! ( "incompatible link kind for `{}`" , path_str) ;
785785 report_diagnostic ( cx, & msg, & item, & dox, link_range, |diag, sp| {
@@ -934,22 +934,6 @@ impl Disambiguator {
934934 }
935935 }
936936 }
937-
938- fn article ( & self ) -> & ' static str {
939- match self {
940- Self :: Namespace ( _) => "a" ,
941- Self :: Kind ( kind) => kind. article ( ) ,
942- }
943- }
944-
945- fn descr ( & self , def_id : DefId ) -> & ' static str {
946- match self {
947- Self :: Namespace ( Namespace :: TypeNS ) => "type" ,
948- Self :: Namespace ( Namespace :: ValueNS ) => "value" ,
949- Self :: Namespace ( Namespace :: MacroNS ) => "macro" ,
950- Self :: Kind ( kind) => kind. descr ( def_id) ,
951- }
952- }
953937}
954938
955939/// Reports a diagnostic for an intra-doc link.
0 commit comments