File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ use std::{
3333 collections:: { BTreeMap , HashMap } ,
3434 sync:: Arc ,
3535} ;
36- use tracing:: { debug, instrument, trace} ;
36+ use tracing:: { debug, error , instrument, trace} ;
3737
3838static DOC_RUST_LANG_ORG_REDIRECTS : Lazy < HashMap < & str , & str > > = Lazy :: new ( || {
3939 HashMap :: from ( [
@@ -540,6 +540,7 @@ pub(crate) async fn rustdoc_html_server_handler(
540540 let params = params. clone ( ) ;
541541 let version = version. clone ( ) ;
542542 let storage = storage. clone ( ) ;
543+ let storage_path = storage_path. clone ( ) ;
543544 move || {
544545 storage. rustdoc_file_exists (
545546 & params. name ,
@@ -571,6 +572,17 @@ pub(crate) async fn rustdoc_html_server_handler(
571572 ) ?
572573 . into_response ( ) )
573574 } else {
575+ if storage_path == format ! ( "{}/index.html" , krate. target_name) {
576+ error ! (
577+ krate = params. name,
578+ version,
579+ original_path = original_path. as_ref( ) ,
580+ storage_path,
581+ "Couldn't find crate documentation root on storage.
582+ Something is wrong with the build."
583+ )
584+ }
585+
574586 Err ( AxumNope :: ResourceNotFound )
575587 } ;
576588 }
You can’t perform that action at this time.
0 commit comments