File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -677,21 +677,22 @@ fn codegen_stmt<'tcx>(
677677 CastKind :: PointerCoercion ( PointerCoercion :: UnsafeFnPointer ) ,
678678 ref operand,
679679 to_ty,
680- )
681- | Rvalue :: Cast (
682- CastKind :: PointerCoercion ( PointerCoercion :: MutToConstPointer ) ,
683- ref operand,
684- to_ty,
685- )
686- | Rvalue :: Cast (
687- CastKind :: PointerCoercion ( PointerCoercion :: ArrayToPointer ) ,
688- ref operand,
689- to_ty,
690680 ) => {
691681 let to_layout = fx. layout_of ( fx. monomorphize ( to_ty) ) ;
692682 let operand = codegen_operand ( fx, operand) ;
693683 lval. write_cvalue ( fx, operand. cast_pointer_to ( to_layout) ) ;
694684 }
685+ Rvalue :: Cast (
686+ CastKind :: PointerCoercion (
687+ PointerCoercion :: MutToConstPointer | PointerCoercion :: ArrayToPointer ,
688+ ) ,
689+ ..,
690+ ) => {
691+ bug ! (
692+ "{:?} is for borrowck, and should never appear in codegen" ,
693+ to_place_and_rval. 1
694+ ) ;
695+ }
695696 Rvalue :: Cast (
696697 CastKind :: IntToInt
697698 | CastKind :: FloatToFloat
You can’t perform that action at this time.
0 commit comments