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>(
772
772
}
773
773
StatementKind :: StorageLive ( _)
774
774
| StatementKind :: StorageDead ( _)
775
+ | StatementKind :: Deinit ( _)
775
776
| StatementKind :: Nop
776
777
| StatementKind :: FakeRead ( ..)
777
778
| 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 {
21
21
}
22
22
23
23
pub ( crate ) fn scalar_to_clif_type ( tcx : TyCtxt < ' _ > , scalar : Scalar ) -> Type {
24
- match scalar. value {
24
+ match scalar. primitive ( ) {
25
25
Primitive :: Int ( int, _sign) => match int {
26
26
Integer :: I8 => types:: I8 ,
27
27
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>(
518
518
StatementKind :: Assign ( _)
519
519
| StatementKind :: FakeRead ( _)
520
520
| StatementKind :: SetDiscriminant { .. }
521
+ | StatementKind :: Deinit ( _)
521
522
| StatementKind :: StorageLive ( _)
522
523
| StatementKind :: StorageDead ( _)
523
524
| StatementKind :: Retag ( _, _)
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ pub(crate) fn codegen_get_discriminant<'tcx>(
105
105
// Decode the discriminant (specifically if it's niche-encoded).
106
106
match * tag_encoding {
107
107
TagEncoding :: Direct => {
108
- let signed = match tag_scalar. value {
108
+ let signed = match tag_scalar. primitive ( ) {
109
109
Int ( _, signed) => signed,
110
110
_ => false ,
111
111
} ;
Original file line number Diff line number Diff line change @@ -288,8 +288,8 @@ fn load_imported_symbols_for_jit(
288
288
match data[ cnum. as_usize ( ) - 1 ] {
289
289
Linkage :: NotLinked | Linkage :: IncludedFromDylib => { }
290
290
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) ) ;
293
293
err. note ( "rustc_codegen_cranelift can only load dylibs in JIT mode." ) ;
294
294
err. emit ( ) ;
295
295
}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ fn codegen_field<'tcx>(
50
50
}
51
51
52
52
fn 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 ) ;
54
54
Offset32 :: new ( b_offset. bytes ( ) . try_into ( ) . unwrap ( ) )
55
55
}
56
56
You can’t perform that action at this time.
0 commit comments