File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -886,6 +886,7 @@ impl LinkCollector<'_, '_> {
886886 let link_text;
887887 let mut path_str;
888888 let disambiguator;
889+ let resolved_crate;
889890 let ( mut res, mut fragment) = {
890891 path_str = if let Ok ( ( d, path) ) = Disambiguator :: from_str ( & link) {
891892 disambiguator = Some ( d) ;
@@ -965,8 +966,8 @@ impl LinkCollector<'_, '_> {
965966 // To work around this, remove it and resolve relative to the crate root instead.
966967 // HACK(jynelson)(2): If we just strip `crate::` then suddenly primitives become ambiguous
967968 // (consider `crate::char`). Instead, change it to `self::`. This works because 'self' is now the crate root.
968- resolved_self = format ! ( "self::{}" , & path_str[ "crate::" . len( ) ..] ) ;
969- path_str = & resolved_self ;
969+ resolved_crate = format ! ( "self::{}" , & path_str[ "crate::" . len( ) ..] ) ;
970+ path_str = & resolved_crate ;
970971 module_id = DefId { krate : item. def_id . krate , index : CRATE_DEF_INDEX } ;
971972 self_id = None ;
972973 } else {
You can’t perform that action at this time.
0 commit comments