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