File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -728,6 +728,12 @@ mod test {
728728 // with or without slash
729729 assert_redirect ( "/rustc" , target, web) ?;
730730 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+
731737 Ok ( ( ) )
732738 } )
733739 }
Original file line number Diff line number Diff line change @@ -170,6 +170,11 @@ pub(super) fn build_routes() -> Routes {
170170 "/rustc" ,
171171 super :: rustdoc:: RustLangRedirector :: new ( "nightly" , "nightly-rustc" ) ,
172172 ) ;
173+ // redirect rustdoc to nightly rustdoc docs
174+ routes. internal_page (
175+ "/rustdoc" ,
176+ super :: rustdoc:: RustLangRedirector :: new ( "nightly" , "nightly-rustc/rustdoc" ) ,
177+ ) ;
173178
174179 routes
175180}
You can’t perform that action at this time.
0 commit comments