@@ -123,7 +123,7 @@ 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) ,
@@ -132,11 +132,12 @@ fn check_rvalue<'tcx>(
132
132
PointerCoercion :: UnsafeFnPointer
133
133
| PointerCoercion :: ClosureFnPointer ( _)
134
134
| PointerCoercion :: ReifyFnPointer ,
135
+ _,
135
136
) ,
136
137
_,
137
138
_,
138
139
) => Err ( ( span, "function pointer casts are not allowed in const fn" . into ( ) ) ) ,
139
- Rvalue :: Cast ( CastKind :: PointerCoercion ( PointerCoercion :: Unsize ) , op, cast_ty) => {
140
+ Rvalue :: Cast ( CastKind :: PointerCoercion ( PointerCoercion :: Unsize , _ ) , op, cast_ty) => {
140
141
let Some ( pointee_ty) = cast_ty. builtin_deref ( true ) else {
141
142
// We cannot allow this for now.
142
143
return Err ( ( span, "unsizing casts are only allowed for references right now" . into ( ) ) ) ;
@@ -154,7 +155,7 @@ fn check_rvalue<'tcx>(
154
155
Rvalue :: Cast ( CastKind :: PointerExposeProvenance , _, _) => {
155
156
Err ( ( span, "casting pointers to ints is unstable in const fn" . into ( ) ) )
156
157
} ,
157
- Rvalue :: Cast ( CastKind :: DynStar , _, _) => {
158
+ Rvalue :: Cast ( CastKind :: PointerCoercion ( PointerCoercion :: DynStar , _ ) , _, _) => {
158
159
// FIXME(dyn-star)
159
160
unimplemented ! ( )
160
161
} ,
0 commit comments