File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -649,14 +649,16 @@ impl Attributes {
649
649
if let Some ( ref fragment) = * fragment {
650
650
let cache = cache ( ) ;
651
651
let url = match cache. extern_locations . get ( krate) {
652
- Some ( & ( _, _, ExternalLocation :: Local ) ) => {
652
+ Some ( & ( ref krate_name, _, ExternalLocation :: Local ) )
653
+ if krate_name == "core" =>
654
+ {
653
655
let depth = CURRENT_DEPTH . with ( |l| l. get ( ) ) ;
654
656
"../" . repeat ( depth)
655
657
}
656
658
Some ( & ( _, _, ExternalLocation :: Remote ( ref s) ) ) => s. to_string ( ) ,
657
- Some ( & ( _, _, ExternalLocation :: Unknown ) ) | None => {
658
- String :: from ( "https://doc.rust-lang.org/nightly" )
659
- }
659
+ Some ( & ( _, _, ExternalLocation :: Local ) )
660
+ | Some ( & ( _ , _ , ExternalLocation :: Unknown ) )
661
+ | None => String :: from ( "https://doc.rust-lang.org/nightly" ) ,
660
662
} ;
661
663
// This is a primitive so the url is done "by hand".
662
664
let tail = fragment. find ( '#' ) . unwrap_or_else ( || fragment. len ( ) ) ;
You can’t perform that action at this time.
0 commit comments