File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed
compiler/rustc_mir_build/src/thir/pattern Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -187,19 +187,7 @@ impl<'tcx> ConstToPat<'tcx> {
187187 ) ;
188188
189189 // FIXME: should this call a `predicate_must_hold` variant instead?
190- let has_impl = self . infcx . predicate_may_hold ( & partial_eq_obligation) ;
191-
192- // Note: To fix rust-lang/rust#65466, we could just remove this type
193- // walk hack for function pointers, and unconditionally error
194- // if `PartialEq` is not implemented. However, that breaks stable
195- // code at the moment, because types like `for <'a> fn(&'a ())` do
196- // not *yet* implement `PartialEq`. So for now we leave this here.
197- has_impl
198- || ty. walk ( ) . any ( |t| match t. unpack ( ) {
199- ty:: subst:: GenericArgKind :: Lifetime ( _) => false ,
200- ty:: subst:: GenericArgKind :: Type ( t) => t. is_fn_ptr ( ) ,
201- ty:: subst:: GenericArgKind :: Const ( _) => false ,
202- } )
190+ self . infcx . predicate_may_hold ( & partial_eq_obligation)
203191 }
204192
205193 fn field_pats (
You can’t perform that action at this time.
0 commit comments