@@ -1135,6 +1135,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
11351135 // FIXME: Add Checks for these
11361136 CastKind :: PointerWithExposedProvenance | CastKind :: PointerExposeProvenance => { }
11371137 CastKind :: PointerCoercion ( PointerCoercion :: ReifyFnPointer ) => {
1138+ // FIXME: check signature compatibility.
11381139 check_kinds ! (
11391140 op_ty,
11401141 "CastKind::{kind:?} input must be a fn item, not {:?}" ,
@@ -1147,7 +1148,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
11471148 ) ;
11481149 }
11491150 CastKind :: PointerCoercion ( PointerCoercion :: UnsafeFnPointer ) => {
1150- // FIXME: check safety
1151+ // FIXME: check safety and signature compatibility.
11511152 check_kinds ! (
11521153 op_ty,
11531154 "CastKind::{kind:?} input must be a fn pointer, not {:?}" ,
@@ -1160,7 +1161,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
11601161 ) ;
11611162 }
11621163 CastKind :: PointerCoercion ( PointerCoercion :: ClosureFnPointer ( ..) ) => {
1163- // FIXME: check safety & captures
1164+ // FIXME: check safety, captures, and signature compatibility.
11641165 check_kinds ! (
11651166 op_ty,
11661167 "CastKind::{kind:?} input must be a closure, not {:?}" ,
@@ -1199,7 +1200,8 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
11991200 ) ;
12001201 }
12011202 CastKind :: PointerCoercion ( PointerCoercion :: Unsize ) => {
1202- // FIXME: Add Checks for this
1203+ // This is used for all `CoerceUnsized` types,
1204+ // not just pointers/references, so is hard to check.
12031205 }
12041206 CastKind :: IntToInt | CastKind :: IntToFloat => {
12051207 let input_valid = op_ty. is_integral ( ) || op_ty. is_char ( ) || op_ty. is_bool ( ) ;
0 commit comments