File tree 4 files changed +4
-8
lines changed
4 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -828,12 +828,6 @@ fn codegen_stmt<'tcx>(
828
828
fx. bcx . ins ( ) . nop ( ) ;
829
829
}
830
830
}
831
- Rvalue :: Len ( place) => {
832
- let place = codegen_place ( fx, place) ;
833
- let usize_layout = fx. layout_of ( fx. tcx . types . usize ) ;
834
- let len = codegen_array_len ( fx, place) ;
835
- lval. write_cvalue ( fx, CValue :: by_val ( len, usize_layout) ) ;
836
- }
837
831
Rvalue :: ShallowInitBox ( ref operand, content_ty) => {
838
832
let content_ty = fx. monomorphize ( content_ty) ;
839
833
let box_layout = fx. layout_of ( Ty :: new_box ( fx. tcx , content_ty) ) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ use std::ffi::c_int;
3
3
#[ cfg( feature = "jit" ) ]
4
4
use std:: ffi:: c_void;
5
5
6
- // FIXME replace with core::ffi::c_size_t once stablized
6
+ // FIXME replace with core::ffi::c_size_t once stabilized
7
7
#[ allow( non_camel_case_types) ]
8
8
#[ cfg( feature = "jit" ) ]
9
9
type size_t = usize ;
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ pub(crate) fn codegen_set_discriminant<'tcx>(
18
18
return ;
19
19
}
20
20
match layout. variants {
21
+ Variants :: Empty => unreachable ! ( "we already handled uninhabited types" ) ,
21
22
Variants :: Single { index } => {
22
23
assert_eq ! ( index, variant_index) ;
23
24
}
@@ -85,6 +86,7 @@ pub(crate) fn codegen_get_discriminant<'tcx>(
85
86
}
86
87
87
88
let ( tag_scalar, tag_field, tag_encoding) = match & layout. variants {
89
+ Variants :: Empty => unreachable ! ( "we already handled uninhabited types" ) ,
88
90
Variants :: Single { index } => {
89
91
let discr_val = layout
90
92
. ty
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ fn dep_symbol_lookup_fn(
294
294
// search path.
295
295
for & cnum in crate_info. used_crates . iter ( ) . rev ( ) {
296
296
let src = & crate_info. used_crate_source [ & cnum] ;
297
- match data[ cnum. as_usize ( ) - 1 ] {
297
+ match data[ cnum] {
298
298
Linkage :: NotLinked | Linkage :: IncludedFromDylib => { }
299
299
Linkage :: Static => {
300
300
let name = crate_info. crate_name [ & cnum] ;
You can’t perform that action at this time.
0 commit comments