@@ -37,7 +37,6 @@ use super::on_unimplemented::{AppendConstMessage, OnUnimplementedNote};
37
37
use super :: suggestions:: get_explanation_based_on_obligation;
38
38
use super :: {
39
39
ArgKind , CandidateSimilarity , FindExprBySpan , GetSafeTransmuteErrorAndReason , ImplCandidate ,
40
- UnsatisfiedConst ,
41
40
} ;
42
41
use crate :: error_reporting:: TypeErrCtxt ;
43
42
use crate :: error_reporting:: infer:: TyCategory ;
@@ -374,13 +373,6 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
374
373
}
375
374
}
376
375
377
- let UnsatisfiedConst ( unsatisfied_const) = self
378
- . maybe_add_note_for_unsatisfied_const (
379
- leaf_trait_predicate,
380
- & mut err,
381
- span,
382
- ) ;
383
-
384
376
if let Some ( ( msg, span) ) = type_def {
385
377
err. span_label ( span, msg) ;
386
378
}
@@ -506,7 +498,6 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
506
498
span,
507
499
is_fn_trait,
508
500
suggested,
509
- unsatisfied_const,
510
501
) ;
511
502
512
503
// Changing mutability doesn't make a difference to whether we have
@@ -2716,7 +2707,6 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
2716
2707
span : Span ,
2717
2708
is_fn_trait : bool ,
2718
2709
suggested : bool ,
2719
- unsatisfied_const : bool ,
2720
2710
) {
2721
2711
let body_def_id = obligation. cause . body_id ;
2722
2712
let span = if let ObligationCauseCode :: BinOp { rhs_span : Some ( rhs_span) , .. } =
@@ -2763,10 +2753,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
2763
2753
self . tcx . def_span ( trait_def_id) ,
2764
2754
crate :: fluent_generated:: trait_selection_trait_has_no_impls,
2765
2755
) ;
2766
- } else if !suggested
2767
- && !unsatisfied_const
2768
- && trait_predicate. polarity ( ) == ty:: PredicatePolarity :: Positive
2769
- {
2756
+ } else if !suggested && trait_predicate. polarity ( ) == ty:: PredicatePolarity :: Positive {
2770
2757
// Can't show anything else useful, try to find similar impls.
2771
2758
let impl_candidates = self . find_similar_impl_candidates ( trait_predicate) ;
2772
2759
if !self . report_similar_impl_candidates (
@@ -2878,17 +2865,6 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
2878
2865
}
2879
2866
}
2880
2867
2881
- fn maybe_add_note_for_unsatisfied_const (
2882
- & self ,
2883
- _trait_predicate : ty:: PolyTraitPredicate < ' tcx > ,
2884
- _err : & mut Diag < ' _ > ,
2885
- _span : Span ,
2886
- ) -> UnsatisfiedConst {
2887
- let unsatisfied_const = UnsatisfiedConst ( false ) ;
2888
- // FIXME(const_trait_impl)
2889
- unsatisfied_const
2890
- }
2891
-
2892
2868
fn report_closure_error (
2893
2869
& self ,
2894
2870
obligation : & PredicateObligation < ' tcx > ,
0 commit comments