@@ -705,7 +705,12 @@ impl<'tcx> RegionInferenceContext<'tcx> {
705
705
) -> Option < RegionErrorKind < ' tcx > > {
706
706
let bound_failure = verify_bound. either (
707
707
|verify_bound| {
708
- if self . eval_verify_bound ( infcx, generic_kind, lower_bound, verify_bound) {
708
+ if self . eval_verify_bound (
709
+ infcx,
710
+ generic_kind. to_ty ( infcx. tcx ) ,
711
+ lower_bound,
712
+ verify_bound,
713
+ ) {
709
714
None
710
715
} else {
711
716
Some ( RegionErrorKind :: TypeTestError {
@@ -1024,7 +1029,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1024
1029
fn eval_rewritten_verify_bound (
1025
1030
& self ,
1026
1031
infcx : & InferCtxt < ' tcx > ,
1027
- generic_kind : & GenericKind < ' tcx > , // FIXME(amandasystems): make into Generic_ty
1032
+ generic_kind : & GenericKind < ' tcx > ,
1028
1033
lower_bound : RegionVid ,
1029
1034
verify_bound : & RewrittenVerifyBound < ' tcx > ,
1030
1035
span : Span ,
@@ -1040,8 +1045,12 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1040
1045
|verify_bound : & Either < VerifyBound < ' tcx > , RewrittenVerifyBound < ' tcx > > | {
1041
1046
verify_bound. as_ref ( ) . either (
1042
1047
|verify_bound| {
1043
- let bound_fails =
1044
- !self . eval_verify_bound ( infcx, generic_kind, lower_bound, verify_bound) ;
1048
+ let bound_fails = !self . eval_verify_bound (
1049
+ infcx,
1050
+ generic_kind. to_ty ( infcx. tcx ) ,
1051
+ lower_bound,
1052
+ verify_bound,
1053
+ ) ;
1045
1054
bound_fails. then ( || bound_fails_due_to_static ( false ) )
1046
1055
} ,
1047
1056
|rewritten| {
@@ -1105,13 +1114,13 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1105
1114
fn eval_verify_bound (
1106
1115
& self ,
1107
1116
infcx : & InferCtxt < ' tcx > ,
1108
- generic_kind : & GenericKind < ' tcx > , // FIXME(amandasystems): make into Generic_ty
1117
+ generic_ty : Ty < ' tcx > ,
1109
1118
lower_bound : RegionVid ,
1110
1119
verify_bound : & VerifyBound < ' tcx > ,
1111
1120
) -> bool {
1112
1121
match verify_bound {
1113
1122
VerifyBound :: IfEq ( verify_if_eq_b) => {
1114
- self . eval_if_eq ( infcx, generic_kind . to_ty ( infcx . tcx ) , lower_bound, * verify_if_eq_b)
1123
+ self . eval_if_eq ( infcx, generic_ty , lower_bound, * verify_if_eq_b)
1115
1124
}
1116
1125
1117
1126
VerifyBound :: IsEmpty => {
@@ -1125,11 +1134,11 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1125
1134
}
1126
1135
1127
1136
VerifyBound :: AnyBound ( verify_bounds) => verify_bounds. iter ( ) . any ( |verify_bound| {
1128
- self . eval_verify_bound ( infcx, generic_kind , lower_bound, verify_bound)
1137
+ self . eval_verify_bound ( infcx, generic_ty , lower_bound, verify_bound)
1129
1138
} ) ,
1130
1139
1131
1140
VerifyBound :: AllBounds ( verify_bounds) => verify_bounds. iter ( ) . all ( |verify_bound| {
1132
- self . eval_verify_bound ( infcx, generic_kind , lower_bound, verify_bound)
1141
+ self . eval_verify_bound ( infcx, generic_ty , lower_bound, verify_bound)
1133
1142
} ) ,
1134
1143
}
1135
1144
}
@@ -1899,7 +1908,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1899
1908
| NllRegionVariableOrigin :: Existential { from_forall : true } => false ,
1900
1909
} ;
1901
1910
1902
- // FIXME(amandasystems) This closure is tooe big to inline, it should be a method if plausible.
1903
1911
// To pick a constraint to blame, we organize constraints by how interesting we expect them
1904
1912
// to be in diagnostics, then pick the most interesting one closest to either the source or
1905
1913
// the target on our constraint path.
0 commit comments