about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
-rw-r--r--compiler/rustc_const_eval/src/interpret/call.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs
index e5c195f08d7..b5f3d07d90b 100644
--- a/compiler/rustc_const_eval/src/interpret/call.rs
+++ b/compiler/rustc_const_eval/src/interpret/call.rs
@@ -319,18 +319,12 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
                 .iter()
                 .any(|feature| !self.tcx.sess.target_features.contains(&feature.name))
         {
-            // Don't include implicit features in the error, unless only implicit features are
-            // missing. This should be rare, because it can only happen when an implicit feature
-            // is disabled, e.g. `+avx2,-avx`
-            let missing_explicit_features = attrs.target_features.iter().any(|feature| {
-                !feature.implied && !self.tcx.sess.target_features.contains(&feature.name)
-            });
             throw_ub_custom!(
                 fluent::const_eval_unavailable_target_features_for_fn,
                 unavailable_feats = attrs
                     .target_features
                     .iter()
-                    .filter(|&feature| !(missing_explicit_features && feature.implied)
+                    .filter(|&feature| !feature.implied
                         && !self.tcx.sess.target_features.contains(&feature.name))
                     .fold(String::new(), |mut s, feature| {
                         if !s.is_empty() {