@@ -4097,7 +4097,6 @@ fn doc_with_public_dependency_transitive() {
40974097 )
40984098 . run ( ) ;
40994099
4100- // All four are documented: the whole chain is public.
41014100 assert ! ( p. root( ) . join( "target/doc/foo/index.html" ) . is_file( ) ) ;
41024101 assert ! ( p. root( ) . join( "target/doc/bar/index.html" ) . is_file( ) ) ;
41034102 assert ! ( p. root( ) . join( "target/doc/baz/index.html" ) . is_file( ) ) ;
@@ -4168,7 +4167,7 @@ fn doc_direct_deps_always_documented() {
41684167#[ cargo_test( nightly, reason = "public-dependency feature is unstable" ) ]
41694168fn doc_with_private_dependency ( ) {
41704169 // foo -> bar (any) -> baz (private)
4171- // foo, bar, and baz are all documented
4170+ // Only foo and bar documented, not baz (transitive private dep)
41724171
41734172 Package :: new ( "baz" , "0.0.1" )
41744173 . file ( "src/lib.rs" , "pub fn baz() {}" )
@@ -4185,7 +4184,7 @@ fn doc_with_private_dependency() {
41854184 "Cargo.toml" ,
41864185 r#"
41874186 cargo-features = ["public-dependency"]
4188-
4187+
41894188 [package]
41904189 name = "foo"
41914190 version = "0.0.1"
@@ -4207,7 +4206,6 @@ fn doc_with_private_dependency() {
42074206[DOWNLOADING] crates ...
42084207[DOWNLOADED] baz v0.0.1 (registry `dummy-registry`)
42094208[DOWNLOADED] bar v0.0.1 (registry `dummy-registry`)
4210- [DOCUMENTING] baz v0.0.1
42114209[CHECKING] baz v0.0.1
42124210[DOCUMENTING] bar v0.0.1
42134211[CHECKING] bar v0.0.1
@@ -4222,8 +4220,7 @@ fn doc_with_private_dependency() {
42224220
42234221 assert ! ( p. root( ) . join( "target/doc/foo/index.html" ) . is_file( ) ) ;
42244222 assert ! ( p. root( ) . join( "target/doc/bar/index.html" ) . is_file( ) ) ;
4225- // baz is documented because cargo docs all transitive deps
4226- assert ! ( p. root( ) . join( "target/doc/baz/index.html" ) . is_file( ) ) ;
4223+ assert ! ( !p. root( ) . join( "target/doc/baz/index.html" ) . is_file( ) ) ;
42274224}
42284225
42294226#[ cargo_test( nightly, reason = "public-dependency feature is unstable" ) ]
@@ -4252,7 +4249,7 @@ fn doc_mixed_public_private_deps() {
42524249 "Cargo.toml" ,
42534250 r#"
42544251 cargo-features = ["public-dependency"]
4255-
4252+
42564253 [package]
42574254 name = "foo"
42584255 version = "0.0.1"
@@ -4281,6 +4278,6 @@ fn doc_mixed_public_private_deps() {
42814278 . is_file( )
42824279 ) ;
42834280
4284- // transitive is also documented (all transitive deps are documented)
4285- assert ! ( p. root( ) . join( "target/doc/transitive/index.html" ) . is_file( ) ) ;
4281+ // transitive should NOT be documented
4282+ assert ! ( ! p. root( ) . join( "target/doc/transitive/index.html" ) . is_file( ) ) ;
42864283}
0 commit comments