@@ -747,30 +747,39 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
747
747
} ;
748
748
749
749
if candidates. is_empty ( ) {
750
- resolution_failure ( cx, & item, path_str, & dox, link_range) ;
751
- // this could just be a normal link
752
- continue ;
753
- }
754
-
755
- let len = candidates. clone ( ) . present_items ( ) . count ( ) ;
756
-
757
- if len == 1 {
758
- candidates. present_items ( ) . next ( ) . unwrap ( )
759
- } else if len == 2 && is_derive_trait_collision ( & candidates) {
760
- candidates. type_ns . unwrap ( )
750
+ if path_str == "true" || path_str == "false" {
751
+ item. attrs . links . push ( (
752
+ ori_link,
753
+ None ,
754
+ Some ( format ! ( "keyword.{}" , path_str, ) ) ,
755
+ ) ) ;
756
+ continue ;
757
+ } else {
758
+ resolution_failure ( cx, & item, path_str, & dox, link_range) ;
759
+ // this could just be a normal link
760
+ continue ;
761
+ }
761
762
} else {
762
- if is_derive_trait_collision ( & candidates) {
763
- candidates. macro_ns = None ;
763
+ let len = candidates. clone ( ) . present_items ( ) . count ( ) ;
764
+
765
+ if len == 1 {
766
+ candidates. present_items ( ) . next ( ) . unwrap ( )
767
+ } else if len == 2 && is_derive_trait_collision ( & candidates) {
768
+ candidates. type_ns . unwrap ( )
769
+ } else {
770
+ if is_derive_trait_collision ( & candidates) {
771
+ candidates. macro_ns = None ;
772
+ }
773
+ ambiguity_error (
774
+ cx,
775
+ & item,
776
+ path_str,
777
+ & dox,
778
+ link_range,
779
+ candidates. map ( |candidate| candidate. map ( |( res, _) | res) ) ,
780
+ ) ;
781
+ continue ;
764
782
}
765
- ambiguity_error (
766
- cx,
767
- & item,
768
- path_str,
769
- & dox,
770
- link_range,
771
- candidates. map ( |candidate| candidate. map ( |( res, _) | res) ) ,
772
- ) ;
773
- continue ;
774
783
}
775
784
}
776
785
Some ( MacroNS ) => {
0 commit comments