diff options
| author | Ralf Jung <post@ralfj.de> | 2024-11-24 12:22:01 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-12-14 08:24:18 +0100 |
| commit | 1ff0558a9455cd0a037da6272815b01952a34d8c (patch) | |
| tree | c9f4ca7fdd5875a028f885c58cdac634f4f1926a /src/lib.rs | |
| parent | 90a70897a6d8a4f5faf1a5d0fb64881f5b867255 (diff) | |
target_features: control separately whether enabling and disabling a target feature is allowed
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs index 764e84be1fe..bb0f2fa5b01 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -483,9 +483,9 @@ fn target_features_cfg( .rust_target_features() .iter() .filter(|(_, gate, _)| gate.in_cfg()) - .filter_map(|&(feature, gate, _)| { + .filter_map(|(feature, gate, _)| { if sess.is_nightly_build() || allow_unstable || gate.requires_nightly().is_none() { - Some(feature) + Some(*feature) } else { None } |
