Skip to content

Commit 00d542f

Browse files
committed
refactor(features): Remove redundant is_local
Its the caller's job to decide whether the warning is relevant
1 parent 9882ab3 commit 00d542f

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/cargo/core/features.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,6 @@ impl Features {
546546
warnings: &mut Vec<String>,
547547
) -> CargoResult<()> {
548548
let nightly_features_allowed = self.nightly_features_allowed;
549-
let is_local = self.is_local;
550549
let Some((slot, feature)) = self.status(feature_name) else {
551550
bail!("unknown cargo feature `{}`", feature_name)
552551
};
@@ -567,19 +566,15 @@ impl Features {
567566

568567
match feature.stability {
569568
Status::Stable => {
570-
// The user can't do anything about non-local packages.
571-
// Warnings are usually suppressed, but just being cautious here.
572-
if is_local {
573-
let warning = format!(
574-
"the cargo feature `{}` has been stabilized in the {} \
569+
let warning = format!(
570+
"the cargo feature `{}` has been stabilized in the {} \
575571
release and is no longer necessary to be listed in the \
576572
manifest\n {}",
577-
feature_name,
578-
feature.version,
579-
see_docs()
580-
);
581-
warnings.push(warning);
582-
}
573+
feature_name,
574+
feature.version,
575+
see_docs()
576+
);
577+
warnings.push(warning);
583578
}
584579
Status::Unstable if !nightly_features_allowed => bail!(
585580
"the cargo feature `{}` requires a nightly version of \

0 commit comments

Comments
 (0)