@@ -123,20 +123,20 @@ fn check_rvalue<'tcx>(
123
123
| CastKind :: FloatToFloat
124
124
| CastKind :: FnPtrToPtr
125
125
| CastKind :: PtrToPtr
126
- | CastKind :: PointerCoercion ( PointerCoercion :: MutToConstPointer | PointerCoercion :: ArrayToPointer ) ,
126
+ | CastKind :: PointerCoercion ( PointerCoercion :: MutToConstPointer | PointerCoercion :: ArrayToPointer , _ ) ,
127
127
operand,
128
128
_,
129
129
) => check_operand ( tcx, operand, span, body, msrv) ,
130
130
Rvalue :: Cast (
131
131
CastKind :: PointerCoercion (
132
132
PointerCoercion :: UnsafeFnPointer
133
133
| PointerCoercion :: ClosureFnPointer ( _)
134
- | PointerCoercion :: ReifyFnPointer ,
134
+ | PointerCoercion :: ReifyFnPointer , _
135
135
) ,
136
136
_,
137
137
_,
138
138
) => Err ( ( span, "function pointer casts are not allowed in const fn" . into ( ) ) ) ,
139
- Rvalue :: Cast ( CastKind :: PointerCoercion ( PointerCoercion :: Unsize ) , op, cast_ty) => {
139
+ Rvalue :: Cast ( CastKind :: PointerCoercion ( PointerCoercion :: Unsize , _ ) , op, cast_ty) => {
140
140
let Some ( pointee_ty) = cast_ty. builtin_deref ( true ) else {
141
141
// We cannot allow this for now.
142
142
return Err ( ( span, "unsizing casts are only allowed for references right now" . into ( ) ) ) ;
@@ -154,7 +154,7 @@ fn check_rvalue<'tcx>(
154
154
Rvalue :: Cast ( CastKind :: PointerExposeProvenance , _, _) => {
155
155
Err ( ( span, "casting pointers to ints is unstable in const fn" . into ( ) ) )
156
156
} ,
157
- Rvalue :: Cast ( CastKind :: PointerCoercion ( PointerCoercion :: DynStar ) , _, _) => {
157
+ Rvalue :: Cast ( CastKind :: PointerCoercion ( PointerCoercion :: DynStar , _ ) , _, _) => {
158
158
// FIXME(dyn-star)
159
159
unimplemented ! ( )
160
160
} ,
0 commit comments