Skip to content

Commit 3a86ecf

Browse files
committed
Fix TODO about nightly features
1 parent 09677c8 commit 3a86ecf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cargo/core/features.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ macro_rules! features {
276276
pub struct Features {
277277
$($feature: bool,)*
278278
activated: Vec<String>,
279+
nightly_features_allowed: bool,
279280
}
280281

281282
impl Feature {
@@ -416,6 +417,7 @@ impl Features {
416417
ret.add(feature, config, warnings)?;
417418
ret.activated.push(feature.to_string());
418419
}
420+
ret.nightly_features_allowed = config.nightly_features_allowed;
419421
Ok(ret)
420422
}
421423

@@ -497,9 +499,7 @@ impl Features {
497499
let feature = feature.name.replace("_", "-");
498500
let mut msg = format!("feature `{}` is required", feature);
499501

500-
// TODO
501-
let channel = channel();
502-
if channel == "nightly" || channel == "dev" {
502+
if self.nightly_features_allowed {
503503
let s = format!(
504504
"\n\nconsider adding `cargo-features = [\"{0}\"]` \
505505
to the manifest",

0 commit comments

Comments
 (0)