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>(
677
677
CastKind :: PointerCoercion ( PointerCoercion :: UnsafeFnPointer ) ,
678
678
ref operand,
679
679
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,
690
680
) => {
691
681
let to_layout = fx. layout_of ( fx. monomorphize ( to_ty) ) ;
692
682
let operand = codegen_operand ( fx, operand) ;
693
683
lval. write_cvalue ( fx, operand. cast_pointer_to ( to_layout) ) ;
694
684
}
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
+ }
695
696
Rvalue :: Cast (
696
697
CastKind :: IntToInt
697
698
| CastKind :: FloatToFloat
You can’t perform that action at this time.
0 commit comments