@@ -9,7 +9,6 @@ use crate::traits::project::ProjectAndUnifyResult;
9
9
10
10
use rustc_data_structures:: fx:: { FxIndexMap , FxIndexSet , IndexEntry } ;
11
11
use rustc_data_structures:: unord:: UnordSet ;
12
- use rustc_infer:: infer:: DefineOpaqueTypes ;
13
12
use rustc_middle:: mir:: interpret:: ErrorHandled ;
14
13
use rustc_middle:: ty:: { Region , RegionVid } ;
15
14
@@ -762,42 +761,10 @@ impl<'tcx> AutoTraitFinder<'tcx> {
762
761
_ => { }
763
762
} ;
764
763
}
765
- ty:: PredicateKind :: ConstEquate ( c1, c2) => {
766
- let evaluate = |c : ty:: Const < ' tcx > | {
767
- if let ty:: ConstKind :: Unevaluated ( unevaluated) = c. kind ( ) {
768
- match selcx. infcx . const_eval_resolve (
769
- obligation. param_env ,
770
- unevaluated,
771
- obligation. cause . span ,
772
- ) {
773
- Ok ( Some ( valtree) ) => Ok ( ty:: Const :: new_value ( selcx. tcx ( ) , valtree, c. ty ( ) ) ) ,
774
- Ok ( None ) => {
775
- let tcx = self . tcx ;
776
- let reported =
777
- tcx. dcx ( ) . emit_err ( UnableToConstructConstantValue {
778
- span : tcx. def_span ( unevaluated. def ) ,
779
- unevaluated : unevaluated,
780
- } ) ;
781
- Err ( ErrorHandled :: Reported ( reported. into ( ) , tcx. def_span ( unevaluated. def ) ) )
782
- }
783
- Err ( err) => Err ( err) ,
784
- }
785
- } else {
786
- Ok ( c)
787
- }
788
- } ;
789
764
790
- match ( evaluate ( c1) , evaluate ( c2) ) {
791
- ( Ok ( c1) , Ok ( c2) ) => {
792
- match selcx. infcx . at ( & obligation. cause , obligation. param_env ) . eq ( DefineOpaqueTypes :: No , c1, c2)
793
- {
794
- Ok ( _) => ( ) ,
795
- Err ( _) => return false ,
796
- }
797
- }
798
- _ => return false ,
799
- }
800
- }
765
+ // FIXME(generic_const_exprs): This code path doesn't affect any tests if it checks for equal
766
+ // constants and avoids the early return that way.
767
+ ty:: PredicateKind :: ConstEquate ( ..) => return false ,
801
768
802
769
// There's not really much we can do with these predicates -
803
770
// we start out with a `ParamEnv` with no inference variables,
0 commit comments