@@ -2009,15 +2009,15 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2009
2009
self . prove_predicate (
2010
2010
ty:: ClauseKind :: WellFormed ( src_ty. into ( ) ) ,
2011
2011
location. to_locations ( ) ,
2012
- ConstraintCategory :: Cast { unsize_to : None } ,
2012
+ ConstraintCategory :: Coercion { unsize_to : None } ,
2013
2013
) ;
2014
2014
2015
2015
let src_ty = self . normalize ( src_ty, location) ;
2016
2016
if let Err ( terr) = self . sub_types (
2017
2017
src_ty,
2018
2018
* ty,
2019
2019
location. to_locations ( ) ,
2020
- ConstraintCategory :: Cast { unsize_to : None } ,
2020
+ ConstraintCategory :: Coercion { unsize_to : None } ,
2021
2021
) {
2022
2022
span_mirbug ! (
2023
2023
self ,
@@ -2038,7 +2038,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2038
2038
self . prove_predicate (
2039
2039
ty:: ClauseKind :: WellFormed ( src_ty. into ( ) ) ,
2040
2040
location. to_locations ( ) ,
2041
- ConstraintCategory :: Cast { unsize_to : None } ,
2041
+ ConstraintCategory :: Coercion { unsize_to : None } ,
2042
2042
) ;
2043
2043
2044
2044
// The type that we see in the fcx is like
@@ -2051,7 +2051,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2051
2051
src_ty,
2052
2052
* ty,
2053
2053
location. to_locations ( ) ,
2054
- ConstraintCategory :: Cast { unsize_to : None } ,
2054
+ ConstraintCategory :: Coercion { unsize_to : None } ,
2055
2055
) {
2056
2056
span_mirbug ! (
2057
2057
self ,
@@ -2076,7 +2076,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2076
2076
ty_fn_ptr_from,
2077
2077
* ty,
2078
2078
location. to_locations ( ) ,
2079
- ConstraintCategory :: Cast { unsize_to : None } ,
2079
+ ConstraintCategory :: Coercion { unsize_to : None } ,
2080
2080
) {
2081
2081
span_mirbug ! (
2082
2082
self ,
@@ -2105,7 +2105,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2105
2105
ty_fn_ptr_from,
2106
2106
* ty,
2107
2107
location. to_locations ( ) ,
2108
- ConstraintCategory :: Cast { unsize_to : None } ,
2108
+ ConstraintCategory :: Coercion { unsize_to : None } ,
2109
2109
) {
2110
2110
span_mirbug ! (
2111
2111
self ,
@@ -2129,7 +2129,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2129
2129
self . prove_trait_ref (
2130
2130
trait_ref,
2131
2131
location. to_locations ( ) ,
2132
- ConstraintCategory :: Cast {
2132
+ ConstraintCategory :: Coercion {
2133
2133
unsize_to : Some ( tcx. fold_regions ( ty, |r, _| {
2134
2134
if let ty:: ReVar ( _) = r. kind ( ) {
2135
2135
tcx. lifetimes . re_erased
@@ -2157,7 +2157,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2157
2157
. iter ( )
2158
2158
. map ( |predicate| predicate. with_self_ty ( tcx, self_ty) ) ,
2159
2159
location. to_locations ( ) ,
2160
- ConstraintCategory :: Cast { unsize_to : None } ,
2160
+ ConstraintCategory :: Coercion { unsize_to : None } ,
2161
2161
) ;
2162
2162
2163
2163
let outlives_predicate = tcx. mk_predicate ( Binder :: dummy (
@@ -2168,7 +2168,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2168
2168
self . prove_predicate (
2169
2169
outlives_predicate,
2170
2170
location. to_locations ( ) ,
2171
- ConstraintCategory :: Cast { unsize_to : None } ,
2171
+ ConstraintCategory :: Coercion { unsize_to : None } ,
2172
2172
) ;
2173
2173
}
2174
2174
@@ -2186,7 +2186,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2186
2186
* ty_from,
2187
2187
* ty_to,
2188
2188
location. to_locations ( ) ,
2189
- ConstraintCategory :: Cast { unsize_to : None } ,
2189
+ ConstraintCategory :: Coercion { unsize_to : None } ,
2190
2190
) {
2191
2191
span_mirbug ! (
2192
2192
self ,
@@ -2248,7 +2248,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2248
2248
* ty_elem,
2249
2249
* ty_to,
2250
2250
location. to_locations ( ) ,
2251
- ConstraintCategory :: Cast { unsize_to : None } ,
2251
+ ConstraintCategory :: Coercion { unsize_to : None } ,
2252
2252
) {
2253
2253
span_mirbug ! (
2254
2254
self ,
@@ -2429,7 +2429,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
2429
2429
src_obj,
2430
2430
dst_obj,
2431
2431
location. to_locations ( ) ,
2432
- ConstraintCategory :: Cast { unsize_to : None } ,
2432
+ ConstraintCategory :: Cast ,
2433
2433
)
2434
2434
. unwrap ( ) ;
2435
2435
}
0 commit comments