target_feature: make it more clear what that 'Option' means

This commit is contained in:
Ralf Jung 2023-11-12 12:41:22 +01:00
parent a13408d824
commit b2add8a63e

View File

@ -384,7 +384,7 @@ pub fn target_features(sess: &Session, allow_unstable: bool, target_info: &Locke
.iter() .iter()
.filter_map( .filter_map(
|&(feature, gate)| { |&(feature, gate)| {
if sess.is_nightly_build() || allow_unstable || gate.is_none() { Some(feature) } else { None } if sess.is_nightly_build() || allow_unstable || gate.is_stable() { Some(feature) } else { None }
}, },
) )
.filter(|_feature| { .filter(|_feature| {