This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +7
-5
lines changed
Expand file tree Collapse file tree 6 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -772,6 +772,7 @@ fn codegen_stmt<'tcx>(
772772 }
773773 StatementKind :: StorageLive ( _)
774774 | StatementKind :: StorageDead ( _)
775+ | StatementKind :: Deinit ( _)
775776 | StatementKind :: Nop
776777 | StatementKind :: FakeRead ( ..)
777778 | StatementKind :: Retag { .. }
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ pub(crate) fn pointer_ty(tcx: TyCtxt<'_>) -> types::Type {
2121}
2222
2323pub ( crate ) fn scalar_to_clif_type ( tcx : TyCtxt < ' _ > , scalar : Scalar ) -> Type {
24- match scalar. value {
24+ match scalar. primitive ( ) {
2525 Primitive :: Int ( int, _sign) => match int {
2626 Integer :: I8 => types:: I8 ,
2727 Integer :: I16 => types:: I16 ,
Original file line number Diff line number Diff line change @@ -518,6 +518,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
518518 StatementKind :: Assign ( _)
519519 | StatementKind :: FakeRead ( _)
520520 | StatementKind :: SetDiscriminant { .. }
521+ | StatementKind :: Deinit ( _)
521522 | StatementKind :: StorageLive ( _)
522523 | StatementKind :: StorageDead ( _)
523524 | StatementKind :: Retag ( _, _)
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ pub(crate) fn codegen_get_discriminant<'tcx>(
105105 // Decode the discriminant (specifically if it's niche-encoded).
106106 match * tag_encoding {
107107 TagEncoding :: Direct => {
108- let signed = match tag_scalar. value {
108+ let signed = match tag_scalar. primitive ( ) {
109109 Int ( _, signed) => signed,
110110 _ => false ,
111111 } ;
Original file line number Diff line number Diff line change @@ -288,8 +288,8 @@ fn load_imported_symbols_for_jit(
288288 match data[ cnum. as_usize ( ) - 1 ] {
289289 Linkage :: NotLinked | Linkage :: IncludedFromDylib => { }
290290 Linkage :: Static => {
291- let name = & crate_info. crate_name [ & cnum] ;
292- let mut err = sess. struct_err ( & format ! ( "Can't load static lib {}" , name. as_str ( ) ) ) ;
291+ let name = crate_info. crate_name [ & cnum] ;
292+ let mut err = sess. struct_err ( & format ! ( "Can't load static lib {}" , name) ) ;
293293 err. note ( "rustc_codegen_cranelift can only load dylibs in JIT mode." ) ;
294294 err. emit ( ) ;
295295 }
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ fn codegen_field<'tcx>(
5050}
5151
5252fn scalar_pair_calculate_b_offset ( tcx : TyCtxt < ' _ > , a_scalar : Scalar , b_scalar : Scalar ) -> Offset32 {
53- let b_offset = a_scalar. value . size ( & tcx) . align_to ( b_scalar. value . align ( & tcx) . abi ) ;
53+ let b_offset = a_scalar. size ( & tcx) . align_to ( b_scalar. align ( & tcx) . abi ) ;
5454 Offset32 :: new ( b_offset. bytes ( ) . try_into ( ) . unwrap ( ) )
5555}
5656
You can’t perform that action at this time.
0 commit comments