@@ -2009,15 +2009,15 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
20092009 self . prove_predicate (
20102010 ty:: ClauseKind :: WellFormed ( src_ty. into ( ) ) ,
20112011 location. to_locations ( ) ,
2012- ConstraintCategory :: Cast { unsize_to : None } ,
2012+ ConstraintCategory :: Coercion { unsize_to : None } ,
20132013 ) ;
20142014
20152015 let src_ty = self . normalize ( src_ty, location) ;
20162016 if let Err ( terr) = self . sub_types (
20172017 src_ty,
20182018 * ty,
20192019 location. to_locations ( ) ,
2020- ConstraintCategory :: Cast { unsize_to : None } ,
2020+ ConstraintCategory :: Coercion { unsize_to : None } ,
20212021 ) {
20222022 span_mirbug ! (
20232023 self ,
@@ -2038,7 +2038,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
20382038 self . prove_predicate (
20392039 ty:: ClauseKind :: WellFormed ( src_ty. into ( ) ) ,
20402040 location. to_locations ( ) ,
2041- ConstraintCategory :: Cast { unsize_to : None } ,
2041+ ConstraintCategory :: Coercion { unsize_to : None } ,
20422042 ) ;
20432043
20442044 // The type that we see in the fcx is like
@@ -2051,7 +2051,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
20512051 src_ty,
20522052 * ty,
20532053 location. to_locations ( ) ,
2054- ConstraintCategory :: Cast { unsize_to : None } ,
2054+ ConstraintCategory :: Coercion { unsize_to : None } ,
20552055 ) {
20562056 span_mirbug ! (
20572057 self ,
@@ -2076,7 +2076,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
20762076 ty_fn_ptr_from,
20772077 * ty,
20782078 location. to_locations ( ) ,
2079- ConstraintCategory :: Cast { unsize_to : None } ,
2079+ ConstraintCategory :: Coercion { unsize_to : None } ,
20802080 ) {
20812081 span_mirbug ! (
20822082 self ,
@@ -2105,7 +2105,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
21052105 ty_fn_ptr_from,
21062106 * ty,
21072107 location. to_locations ( ) ,
2108- ConstraintCategory :: Cast { unsize_to : None } ,
2108+ ConstraintCategory :: Coercion { unsize_to : None } ,
21092109 ) {
21102110 span_mirbug ! (
21112111 self ,
@@ -2129,7 +2129,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
21292129 self . prove_trait_ref (
21302130 trait_ref,
21312131 location. to_locations ( ) ,
2132- ConstraintCategory :: Cast {
2132+ ConstraintCategory :: Coercion {
21332133 unsize_to : Some ( tcx. fold_regions ( ty, |r, _| {
21342134 if let ty:: ReVar ( _) = r. kind ( ) {
21352135 tcx. lifetimes . re_erased
@@ -2157,7 +2157,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
21572157 . iter ( )
21582158 . map ( |predicate| predicate. with_self_ty ( tcx, self_ty) ) ,
21592159 location. to_locations ( ) ,
2160- ConstraintCategory :: Cast { unsize_to : None } ,
2160+ ConstraintCategory :: Coercion { unsize_to : None } ,
21612161 ) ;
21622162
21632163 let outlives_predicate = tcx. mk_predicate ( Binder :: dummy (
@@ -2168,7 +2168,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
21682168 self . prove_predicate (
21692169 outlives_predicate,
21702170 location. to_locations ( ) ,
2171- ConstraintCategory :: Cast { unsize_to : None } ,
2171+ ConstraintCategory :: Coercion { unsize_to : None } ,
21722172 ) ;
21732173 }
21742174
@@ -2186,7 +2186,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
21862186 * ty_from,
21872187 * ty_to,
21882188 location. to_locations ( ) ,
2189- ConstraintCategory :: Cast { unsize_to : None } ,
2189+ ConstraintCategory :: Coercion { unsize_to : None } ,
21902190 ) {
21912191 span_mirbug ! (
21922192 self ,
@@ -2248,7 +2248,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
22482248 * ty_elem,
22492249 * ty_to,
22502250 location. to_locations ( ) ,
2251- ConstraintCategory :: Cast { unsize_to : None } ,
2251+ ConstraintCategory :: Coercion { unsize_to : None } ,
22522252 ) {
22532253 span_mirbug ! (
22542254 self ,
@@ -2429,7 +2429,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
24292429 src_obj,
24302430 dst_obj,
24312431 location. to_locations ( ) ,
2432- ConstraintCategory :: Cast { unsize_to : None } ,
2432+ ConstraintCategory :: Cast ,
24332433 )
24342434 . unwrap ( ) ;
24352435 }
0 commit comments