Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(toml): Don't require MSRV bump for pub/priv #14507

Merged
merged 1 commit into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/cargo/util/toml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -786,12 +786,8 @@ fn normalize_dependencies<'a>(
warnings,
)?;
if d.public.is_some() {
let public_feature = features.require(Feature::public_dependency());
let with_public_feature = public_feature.is_ok();
let with_public_feature = features.require(Feature::public_dependency()).is_ok();
let with_z_public = gctx.cli_unstable().public_dependency;
if !with_public_feature && (!with_z_public && !gctx.nightly_features_allowed) {
public_feature?;
}
if matches!(kind, None) {
if !with_public_feature && !with_z_public {
d.public = None;
Expand Down
1 change: 0 additions & 1 deletion tests/testsuite/pub_priv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ fn pub_dev_dependency_without_feature() {
.build();

p.cargo("check --message-format=short")
.masquerade_as_nightly_cargo(&["public-dependency"])
.with_stderr_data(str![[r#"
[WARNING] 'public' specifier can only be used on regular dependencies, not dev-dependencies
[UPDATING] `dummy-registry` index
Expand Down