@@ -381,11 +381,6 @@ pub fn target_redirect_handler(req: &mut Request) -> IronResult<Response> {
381
381
file_path. remove ( 3 ) ;
382
382
if file_path[ 3 ] == crate_details. metadata . default_target {
383
383
file_path. remove ( 3 ) ;
384
- } else if file_path[ 4 ] != crate_details. target_name {
385
- // For non-default targets we only redirect to paths within the current crate
386
- file_path. drain ( 4 ..) ;
387
- file_path. push ( & crate_details. target_name ) ;
388
- file_path. push ( "index.html" ) ;
389
384
}
390
385
if let Some ( last) = file_path. last_mut ( ) {
391
386
if * last == "" {
@@ -1032,6 +1027,7 @@ mod test {
1032
1027
. rustdoc_file ( "dummy/index.html" , b"some content" )
1033
1028
. rustdoc_file ( "dummy/struct.Dummy.html" , b"some other content" )
1034
1029
. rustdoc_file ( "dummy/struct.DefaultOnly.html" , b"some otter content" )
1030
+ . rustdoc_file ( "x86_64-pc-windows-msvc/settings.html" , b"top-level items" )
1035
1031
. rustdoc_file ( "x86_64-pc-windows-msvc/dummy/index.html" , b"some content" )
1036
1032
. rustdoc_file (
1037
1033
"x86_64-pc-windows-msvc/dummy/struct.Dummy.html" ,
@@ -1053,7 +1049,7 @@ mod test {
1053
1049
& [
1054
1050
(
1055
1051
"x86_64-pc-windows-msvc" ,
1056
- "/dummy/0.4.0/x86_64-pc-windows-msvc/dummy/index .html" ,
1052
+ "/dummy/0.4.0/x86_64-pc-windows-msvc/settings .html" ,
1057
1053
) ,
1058
1054
( "x86_64-unknown-linux-gnu" , "/dummy/0.4.0/settings.html" ) ,
1059
1055
] ,
0 commit comments