File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -475,8 +475,13 @@ pub fn create_bcx<'a, 'cfg>(
475
475
extra_args = Some ( args) ;
476
476
}
477
477
478
- if let Some ( args) = extra_args {
479
- extra_compiler_args. insert ( unit. clone ( ) , args. clone ( ) ) ;
478
+ if let Some ( mut args) = extra_args {
479
+ match extra_compiler_args. get_mut ( & unit) {
480
+ None => {
481
+ extra_compiler_args. insert ( unit. clone ( ) , args) ;
482
+ }
483
+ Some ( existing) => existing. append ( & mut args) ,
484
+ }
480
485
}
481
486
}
482
487
}
Original file line number Diff line number Diff line change @@ -39,6 +39,19 @@ fn rustdoc_args() {
39
39
. run ( ) ;
40
40
}
41
41
42
+ #[ cargo_test]
43
+ fn rustdoc_binary_args_passed ( ) {
44
+ let p = project ( ) . file ( "src/main.rs" , "" ) . build ( ) ;
45
+
46
+ p. cargo ( "rustdoc -v" )
47
+ . arg ( "--" )
48
+ . arg ( "--theme" )
49
+ . arg ( "dark" )
50
+ . with_stderr_contains ( "[RUNNING] `rustdoc [..] --theme dark[..]`" )
51
+ . with_status ( 101 )
52
+ . run ( ) ;
53
+ }
54
+
42
55
#[ cargo_test]
43
56
fn rustdoc_foo_with_bar_dependency ( ) {
44
57
let foo = project ( )
You can’t perform that action at this time.
0 commit comments