File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -728,6 +728,12 @@ mod test {
728
728
// with or without slash
729
729
assert_redirect ( "/rustc" , target, web) ?;
730
730
assert_redirect ( "/rustc/" , target, web) ?;
731
+
732
+ let target = "https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/" ;
733
+ // with or without slash
734
+ assert_redirect ( "/rustdoc" , target, web) ?;
735
+ assert_redirect ( "/rustdoc/" , target, web) ?;
736
+
731
737
Ok ( ( ) )
732
738
} )
733
739
}
Original file line number Diff line number Diff line change @@ -170,6 +170,11 @@ pub(super) fn build_routes() -> Routes {
170
170
"/rustc" ,
171
171
super :: rustdoc:: RustLangRedirector :: new ( "nightly" , "nightly-rustc" ) ,
172
172
) ;
173
+ // redirect rustdoc to nightly rustdoc docs
174
+ routes. internal_page (
175
+ "/rustdoc" ,
176
+ super :: rustdoc:: RustLangRedirector :: new ( "nightly" , "nightly-rustc/rustdoc" ) ,
177
+ ) ;
173
178
174
179
routes
175
180
}
You can’t perform that action at this time.
0 commit comments