about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-01 19:46:46 +0000
committerbors <bors@rust-lang.org>2024-09-01 19:46:46 +0000
commit94885bc699512cfee8560e73c2a01ee6b4b76563 (patch)
tree28f7a17d4c29dfd19039236416d95586b2164db9 /compiler/rustc_trait_selection/src
parenta48861a6279b386ad2b9c3518490181d238fe727 (diff)
parent47e6b5deed5cc79c677def8d1a165658fa79d810 (diff)
downloadrust-94885bc699512cfee8560e73c2a01ee6b4b76563.tar.gz
rust-94885bc699512cfee8560e73c2a01ee6b4b76563.zip
Auto merge of #129854 - Kobzol:revert-127537, r=lqd
Revert "Auto merge of #127537 - veluca93:struct_tf, r=BoxyUwU"

This reverts https://github.com/rust-lang/rust/pull/127537 (commit acb4e8b6251f1d8da36f08e7a70fa23fc581839e), reversing changes made to 100fde5246bf56f22fb5cc85374dd841296fce0e.

Opening to see if this can help resolve the recent perf. results [instability](https://rust-lang.zulipchat.com/#narrow/stream/247081-t-compiler.2Fperformance/topic/Weird.20perf.20results).
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs2
-rw-r--r--compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs2
2 files changed, 0 insertions, 4 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs
index 3fdfca50dce..effd9f8cb0c 100644
--- a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs
+++ b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs
@@ -439,8 +439,6 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
                         let is_target_feature_fn = if let ty::FnDef(def_id, _) =
                             *leaf_trait_ref.skip_binder().self_ty().kind()
                         {
-                            // FIXME(struct_target_features): should a function that inherits
-                            // target_features through arguments implement Fn traits?
                             !self.tcx.codegen_fn_attrs(def_id).target_features.is_empty()
                         } else {
                             false
diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
index 7895a420476..96faa5236b1 100644
--- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
+++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
@@ -546,8 +546,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
             // Provide an impl for suitable functions, rejecting `#[target_feature]` functions (RFC 2396).
             ty::FnDef(def_id, args) => {
                 let tcx = self.tcx();
-                // FIXME(struct_target_features): should a function that inherits target_features
-                // through an argument implement Fn traits?
                 if tcx.fn_sig(def_id).skip_binder().is_fn_trait_compatible()
                     && tcx.codegen_fn_attrs(def_id).target_features.is_empty()
                 {