Skip to content

Commit 8c8824f

Browse files
committed
Remove 'private' flag
1 parent a22a7db commit 8c8824f

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/cargo/core/compiler/mod.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,23 +1007,16 @@ fn build_deps_args<'a, 'cfg>(
10071007
v.push(&path::MAIN_SEPARATOR.to_string());
10081008
v.push(&output.path.file_name().unwrap());
10091009

1010-
let mut private = false;
1010+
if current.pkg.manifest().features().require(Feature::public_dependency()).is_ok() &&
1011+
!bcx.is_public_dependency(current, dep) {
10111012

1012-
if current.pkg.manifest().features().require(Feature::public_dependency()).is_ok() {
1013-
if !bcx.is_public_dependency(current, dep) {
1014-
private = true;
1015-
}
1016-
}
1017-
1018-
if private {
1019-
cmd.arg("--extern-private");
1013+
cmd.arg("--extern-private");
1014+
*need_unstable_opts = true;
10201015
} else {
10211016
cmd.arg("--extern");
10221017
}
10231018

10241019
cmd.arg(&v);
1025-
*need_unstable_opts |= private;
1026-
10271020
}
10281021
Ok(())
10291022
}

0 commit comments

Comments
 (0)