@@ -705,7 +705,12 @@ impl<'tcx> RegionInferenceContext<'tcx> {
705705 ) -> Option < RegionErrorKind < ' tcx > > {
706706 let bound_failure = verify_bound. either (
707707 |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+ ) {
709714 None
710715 } else {
711716 Some ( RegionErrorKind :: TypeTestError {
@@ -1024,7 +1029,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
10241029 fn eval_rewritten_verify_bound (
10251030 & self ,
10261031 infcx : & InferCtxt < ' tcx > ,
1027- generic_kind : & GenericKind < ' tcx > , // FIXME(amandasystems): make into Generic_ty
1032+ generic_kind : & GenericKind < ' tcx > ,
10281033 lower_bound : RegionVid ,
10291034 verify_bound : & RewrittenVerifyBound < ' tcx > ,
10301035 span : Span ,
@@ -1040,8 +1045,12 @@ impl<'tcx> RegionInferenceContext<'tcx> {
10401045 |verify_bound : & Either < VerifyBound < ' tcx > , RewrittenVerifyBound < ' tcx > > | {
10411046 verify_bound. as_ref ( ) . either (
10421047 |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+ ) ;
10451054 bound_fails. then ( || bound_fails_due_to_static ( false ) )
10461055 } ,
10471056 |rewritten| {
@@ -1105,13 +1114,13 @@ impl<'tcx> RegionInferenceContext<'tcx> {
11051114 fn eval_verify_bound (
11061115 & self ,
11071116 infcx : & InferCtxt < ' tcx > ,
1108- generic_kind : & GenericKind < ' tcx > , // FIXME(amandasystems): make into Generic_ty
1117+ generic_ty : Ty < ' tcx > ,
11091118 lower_bound : RegionVid ,
11101119 verify_bound : & VerifyBound < ' tcx > ,
11111120 ) -> bool {
11121121 match verify_bound {
11131122 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)
11151124 }
11161125
11171126 VerifyBound :: IsEmpty => {
@@ -1125,11 +1134,11 @@ impl<'tcx> RegionInferenceContext<'tcx> {
11251134 }
11261135
11271136 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)
11291138 } ) ,
11301139
11311140 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)
11331142 } ) ,
11341143 }
11351144 }
@@ -1899,7 +1908,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
18991908 | NllRegionVariableOrigin :: Existential { from_forall : true } => false ,
19001909 } ;
19011910
1902- // FIXME(amandasystems) This closure is tooe big to inline, it should be a method if plausible.
19031911 // To pick a constraint to blame, we organize constraints by how interesting we expect them
19041912 // to be in diagnostics, then pick the most interesting one closest to either the source or
19051913 // the target on our constraint path.
0 commit comments