@@ -38,14 +38,14 @@ fn rustdoc_args() {
38
38
"# )
39
39
. file ( "src/lib.rs" , r#" "# ) ;
40
40
41
- assert_that ( p. cargo_process ( "rustdoc" ) . arg ( "-v" ) . arg ( "--" ) . arg ( "--no-defaults " ) ,
41
+ assert_that ( p. cargo_process ( "rustdoc" ) . arg ( "-v" ) . arg ( "--" ) . arg ( "--cfg=foo " ) ,
42
42
execs ( )
43
43
. with_status ( 0 )
44
44
. with_stderr ( format ! ( "\
45
45
[DOCUMENTING] foo v0.0.1 ({url})
46
46
[RUNNING] `rustdoc --crate-name foo src[/]lib.rs \
47
47
-o {dir}[/]target[/]doc \
48
- --no-defaults \
48
+ --cfg=foo \
49
49
-L dependency={dir}[/]target[/]debug[/]deps`
50
50
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
51
51
" , dir = p. root( ) . display( ) , url = p. url( ) ) ) ) ;
@@ -81,7 +81,7 @@ fn rustdoc_foo_with_bar_dependency() {
81
81
"# ) ;
82
82
bar. build ( ) ;
83
83
84
- assert_that ( foo. cargo_process ( "rustdoc" ) . arg ( "-v" ) . arg ( "--" ) . arg ( "--no-defaults " ) ,
84
+ assert_that ( foo. cargo_process ( "rustdoc" ) . arg ( "-v" ) . arg ( "--" ) . arg ( "--cfg=foo " ) ,
85
85
execs ( )
86
86
. with_status ( 0 )
87
87
. with_stderr ( format ! ( "\
@@ -90,7 +90,7 @@ fn rustdoc_foo_with_bar_dependency() {
90
90
[DOCUMENTING] foo v0.0.1 ({url})
91
91
[RUNNING] `rustdoc --crate-name foo src[/]lib.rs \
92
92
-o {dir}[/]target[/]doc \
93
- --no-defaults \
93
+ --cfg=foo \
94
94
-L dependency={dir}[/]target[/]debug[/]deps \
95
95
--extern [..]`
96
96
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
@@ -128,14 +128,14 @@ fn rustdoc_only_bar_dependency() {
128
128
bar. build ( ) ;
129
129
130
130
assert_that ( foo. cargo_process ( "rustdoc" ) . arg ( "-v" ) . arg ( "-p" ) . arg ( "bar" )
131
- . arg ( "--" ) . arg ( "--no-defaults " ) ,
131
+ . arg ( "--" ) . arg ( "--cfg=foo " ) ,
132
132
execs ( )
133
133
. with_status ( 0 )
134
134
. with_stderr ( format ! ( "\
135
135
[DOCUMENTING] bar v0.0.1 ([..])
136
136
[RUNNING] `rustdoc --crate-name bar [..]bar[/]src[/]lib.rs \
137
137
-o {dir}[/]target[/]doc \
138
- --no-defaults \
138
+ --cfg=foo \
139
139
-L dependency={dir}[/]target[/]debug[/]deps`
140
140
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
141
141
" , dir = foo. root( ) . display( ) ) ) ) ;
@@ -157,7 +157,7 @@ fn rustdoc_same_name_err() {
157
157
. file ( "src/lib.rs" , r#" "# ) ;
158
158
159
159
assert_that ( p. cargo_process ( "rustdoc" ) . arg ( "-v" )
160
- . arg ( "--" ) . arg ( "--no-defaults " ) ,
160
+ . arg ( "--" ) . arg ( "--cfg=foo " ) ,
161
161
execs ( )
162
162
. with_status ( 101 )
163
163
. with_stderr ( "[ERROR] cannot document a package where a library and a \
0 commit comments