@@ -123,20 +123,20 @@ fn check_rvalue<'tcx>(
123123 | CastKind :: FloatToFloat
124124 | CastKind :: FnPtrToPtr
125125 | CastKind :: PtrToPtr
126- | CastKind :: PointerCoercion ( PointerCoercion :: MutToConstPointer | PointerCoercion :: ArrayToPointer ) ,
126+ | CastKind :: PointerCoercion ( PointerCoercion :: MutToConstPointer | PointerCoercion :: ArrayToPointer , _ ) ,
127127 operand,
128128 _,
129129) => check_operand ( tcx, operand, span, body, msrv) ,
130130Rvalue :: Cast (
131131CastKind :: PointerCoercion (
132132PointerCoercion :: UnsafeFnPointer
133133 | PointerCoercion :: ClosureFnPointer ( _)
134- | PointerCoercion :: ReifyFnPointer ,
134+ | PointerCoercion :: ReifyFnPointer , _
135135) ,
136136 _,
137137 _,
138138) => 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) => {
140140let Some ( pointee_ty) = cast_ty. builtin_deref ( true ) else {
141141// We cannot allow this for now.
142142return Err ( ( span, "unsizing casts are only allowed for references right now" . into ( ) ) ) ;
@@ -154,7 +154,7 @@ fn check_rvalue<'tcx>(
154154Rvalue :: Cast ( CastKind :: PointerExposeProvenance , _, _) => {
155155Err ( ( span, "casting pointers to ints is unstable in const fn" . into ( ) ) )
156156} ,
157- Rvalue :: Cast ( CastKind :: PointerCoercion ( PointerCoercion :: DynStar ) , _, _) => {
157+ Rvalue :: Cast ( CastKind :: PointerCoercion ( PointerCoercion :: DynStar , _ ) , _, _) => {
158158// FIXME(dyn-star)
159159unimplemented ! ( )
160160} ,
0 commit comments