We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e578fc1 commit a22a7dbCopy full SHA for a22a7db
src/cargo/core/compiler/mod.rs
@@ -1006,14 +1006,24 @@ fn build_deps_args<'a, 'cfg>(
1006
v.push(cx.files().out_dir(dep));
1007
v.push(&path::MAIN_SEPARATOR.to_string());
1008
v.push(&output.path.file_name().unwrap());
1009
- cmd.arg("--extern").arg(&v);
+
1010
+ let mut private = false;
1011
1012
if current.pkg.manifest().features().require(Feature::public_dependency()).is_ok() {
1013
if !bcx.is_public_dependency(current, dep) {
- cmd.arg("--extern-private").arg(&v);
1014
- *need_unstable_opts = true
+ private = true;
1015
}
1016
1017
1018
+ if private {
1019
+ cmd.arg("--extern-private");
1020
+ } else {
1021
+ cmd.arg("--extern");
1022
+ }
1023
1024
+ cmd.arg(&v);
1025
+ *need_unstable_opts |= private;
1026
1027
1028
Ok(())
1029
0 commit comments