@@ -779,7 +779,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
779
779
// All of these are valid, so do nothing
780
780
=> { }
781
781
( actual, Some ( Disambiguator :: Kind ( expected) ) ) if actual == expected => { }
782
- ( _, Some ( expected) ) => {
782
+ ( _, Some ( Disambiguator :: Kind ( expected) ) ) => {
783
783
// The resolved item did not match the disambiguator; give a better error than 'not found'
784
784
let msg = format ! ( "incompatible link kind for `{}`" , path_str) ;
785
785
report_diagnostic ( cx, & msg, & item, & dox, link_range, |diag, sp| {
@@ -934,22 +934,6 @@ impl Disambiguator {
934
934
}
935
935
}
936
936
}
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
- }
953
937
}
954
938
955
939
/// Reports a diagnostic for an intra-doc link.
0 commit comments