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<'_, '_> {
886
886
let link_text;
887
887
let mut path_str;
888
888
let disambiguator;
889
+ let resolved_crate;
889
890
let ( mut res, mut fragment) = {
890
891
path_str = if let Ok ( ( d, path) ) = Disambiguator :: from_str ( & link) {
891
892
disambiguator = Some ( d) ;
@@ -965,8 +966,8 @@ impl LinkCollector<'_, '_> {
965
966
// To work around this, remove it and resolve relative to the crate root instead.
966
967
// HACK(jynelson)(2): If we just strip `crate::` then suddenly primitives become ambiguous
967
968
// (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 ;
970
971
module_id = DefId { krate : item. def_id . krate , index : CRATE_DEF_INDEX } ;
971
972
self_id = None ;
972
973
} else {
You can’t perform that action at this time.
0 commit comments