File tree Expand file tree Collapse file tree 2 files changed +6
-18
lines changed
src/cargo/ops/cargo_compile Expand file tree Collapse file tree 2 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,9 @@ impl<'a> UnitGenerator<'a, '_> {
198198 . filter ( |t| {
199199 t. documented ( )
200200 && ( !t. is_bin ( )
201- || !targets. iter ( ) . any ( |l| l. is_lib ( ) && l. name ( ) == t. name ( ) ) )
201+ || !targets
202+ . iter ( )
203+ . any ( |l| l. is_lib ( ) && l. crate_name ( ) == t. crate_name ( ) ) )
202204 } )
203205 . collect ( )
204206 }
Original file line number Diff line number Diff line change @@ -488,30 +488,16 @@ fn doc_lib_bin_same_name_with_dash() {
488488 . file ( "src/main.rs" , "fn main() {}" )
489489 . build ( ) ;
490490 p. cargo ( "doc" )
491- . with_stderr_unordered (
491+ . with_stderr (
492492 "\
493- warning: output filename collision.
494- The bin target `foo-bar` in package `foo-bar v1.0.0 ([ROOT]/foo)` has the same \
495- output filename as the lib target `foo_bar` in package `foo-bar v1.0.0 ([ROOT]/foo)`.
496- Colliding filename is: [ROOT]/foo/target/doc/foo_bar/index.html
497- The output filenames should be unique.
498- This is a known bug where multiple crates with the same name use
499- the same path; see <https://github.com/rust-lang/cargo/issues/6313>.
500- If this looks unexpected, it may be a bug in Cargo. Please file a bug report at
501- https://github.com/rust-lang/cargo/issues/ with as much information as you
502- can provide.
503- cargo [..]
504- First unit: [..]
505- Second unit: [..]
506- [CHECKING] foo-bar v1.0.0 ([ROOT]/foo)
507493 [DOCUMENTING] foo-bar v1.0.0 ([ROOT]/foo)
508494[FINISHED] [..]
509- [GENERATED] [ROOT]/foo/target/doc/foo_bar/index.html and 1 other file
495+ [GENERATED] [ROOT]/foo/target/doc/foo_bar/index.html
510496" ,
511497 )
512498 . run ( ) ;
513499 assert ! ( p. build_dir( ) . join( "doc/foo_bar/index.html" ) . exists( ) ) ;
514- assert ! ( p. build_dir( ) . join( "doc/foo_bar/fn.main.html" ) . exists( ) ) ;
500+ assert ! ( ! p. build_dir( ) . join( "doc/foo_bar/fn.main.html" ) . exists( ) ) ;
515501}
516502
517503#[ cargo_test]
You can’t perform that action at this time.
0 commit comments