File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
src/cargo/core/compiler/build_context Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -773,7 +773,7 @@ impl RustDocFingerprint {
773
773
)
774
774
}
775
775
776
- fn remove_doc_dirs ( doc_dirs : & Vec < PathBuf > ) -> CargoResult < ( ) > {
776
+ fn remove_doc_dirs ( doc_dirs : & Vec < & Path > ) -> CargoResult < ( ) > {
777
777
let errs: Vec < CargoResult < ( ) > > = doc_dirs
778
778
. iter ( )
779
779
. map ( |path| paths:: remove_dir_all ( & path) )
@@ -800,15 +800,11 @@ impl RustDocFingerprint {
800
800
} ;
801
801
802
802
// Collect all of the target doc paths for which the docs need to be compiled for.
803
- let doc_dirs: Vec < PathBuf > = cx
804
- . compilation
805
- . root_output
803
+ let doc_dirs: Vec < & Path > = cx
804
+ . bcx
805
+ . all_kinds
806
806
. iter ( )
807
- . map ( |( ck, _) | match ck {
808
- CompileKind :: Host => cx. files ( ) . host_root ( ) . to_path_buf ( ) ,
809
- CompileKind :: Target ( t) => cx. files ( ) . host_root ( ) . join ( Path :: new ( t. rustc_target ( ) ) ) ,
810
- } )
811
- . map ( |path| path. join ( "doc" ) )
807
+ . map ( |kind| cx. files ( ) . layout ( * kind) . doc ( ) )
812
808
. collect ( ) ;
813
809
814
810
// Check wether `.rustdoc_fingerprint.json` exists
You can’t perform that action at this time.
0 commit comments