@@ -678,7 +678,6 @@ pub fn to_real_manifest(
678678 nested_paths : & mut nested_paths,
679679 config,
680680 warnings : & mut warnings,
681- features : & features,
682681 platform : None ,
683682 root : package_root,
684683 } ;
@@ -1153,7 +1152,6 @@ fn to_virtual_manifest(
11531152 config,
11541153 warnings : & mut warnings,
11551154 platform : None ,
1156- features : & features,
11571155 root,
11581156 } ;
11591157 ( replace ( & me, & mut cx) ?, patch ( & me, & mut cx) ?)
@@ -1302,7 +1300,6 @@ struct Context<'a, 'b> {
13021300 warnings : & ' a mut Vec < String > ,
13031301 platform : Option < Platform > ,
13041302 root : & ' a Path ,
1305- features : & ' a Features ,
13061303}
13071304
13081305fn verify_lints ( lints : Option < manifest:: TomlLints > ) -> CargoResult < Option < manifest:: TomlLints > > {
@@ -1709,7 +1706,6 @@ pub(crate) fn to_dependency<P: ResolveToPath + Clone>(
17091706 warnings : & mut Vec < String > ,
17101707 platform : Option < Platform > ,
17111708 root : & Path ,
1712- features : & Features ,
17131709 kind : Option < DepKind > ,
17141710) -> CargoResult < Dependency > {
17151711 dep_to_dependency (
@@ -1723,7 +1719,6 @@ pub(crate) fn to_dependency<P: ResolveToPath + Clone>(
17231719 warnings,
17241720 platform,
17251721 root,
1726- features,
17271722 } ,
17281723 kind,
17291724 )
@@ -1944,13 +1939,18 @@ fn detailed_dep_to_dependency<P: ResolveToPath + Clone>(
19441939 }
19451940
19461941 if let Some ( p) = orig. public {
1947- cx. features . require ( Feature :: public_dependency ( ) ) ?;
1948-
19491942 if dep. kind ( ) != DepKind :: Normal {
19501943 bail ! ( "'public' specifier can only be used on regular dependencies, not {:?} dependencies" , dep. kind( ) ) ;
19511944 }
19521945
1953- dep. set_public ( p) ;
1946+ if !cx. config . cli_unstable ( ) . public_dependency {
1947+ cx. warnings . push ( format ! (
1948+ "{name} uses 'public' specifier, pass `-Zpublic-dependency` to enable support for it" ,
1949+ name = dep. name_in_toml( ) ,
1950+ ) )
1951+ } else {
1952+ dep. set_public ( p) ;
1953+ }
19541954 }
19551955
19561956 if let ( Some ( artifact) , is_lib, target) = (
0 commit comments