This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +4
-8
lines changed Expand file tree Collapse file tree 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>(
828828 fx. bcx . ins ( ) . nop ( ) ;
829829 }
830830 }
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- }
837831 Rvalue :: ShallowInitBox ( ref operand, content_ty) => {
838832 let content_ty = fx. monomorphize ( content_ty) ;
839833 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;
33#[ cfg( feature = "jit" ) ]
44use std:: ffi:: c_void;
55
6- // FIXME replace with core::ffi::c_size_t once stablized
6+ // FIXME replace with core::ffi::c_size_t once stabilized
77#[ allow( non_camel_case_types) ]
88#[ cfg( feature = "jit" ) ]
99type size_t = usize ;
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ pub(crate) fn codegen_set_discriminant<'tcx>(
1818 return ;
1919 }
2020 match layout. variants {
21+ Variants :: Empty => unreachable ! ( "we already handled uninhabited types" ) ,
2122 Variants :: Single { index } => {
2223 assert_eq ! ( index, variant_index) ;
2324 }
@@ -85,6 +86,7 @@ pub(crate) fn codegen_get_discriminant<'tcx>(
8586 }
8687
8788 let ( tag_scalar, tag_field, tag_encoding) = match & layout. variants {
89+ Variants :: Empty => unreachable ! ( "we already handled uninhabited types" ) ,
8890 Variants :: Single { index } => {
8991 let discr_val = layout
9092 . ty
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ fn dep_symbol_lookup_fn(
294294 // search path.
295295 for & cnum in crate_info. used_crates . iter ( ) . rev ( ) {
296296 let src = & crate_info. used_crate_source [ & cnum] ;
297- match data[ cnum. as_usize ( ) - 1 ] {
297+ match data[ cnum] {
298298 Linkage :: NotLinked | Linkage :: IncludedFromDylib => { }
299299 Linkage :: Static => {
300300 let name = crate_info. crate_name [ & cnum] ;
You can’t perform that action at this time.
0 commit comments