diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-01-20 14:35:25 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-01-20 14:35:25 +0000 |
| commit | 496b073257855380eaf057dc43e65030c0fb9e64 (patch) | |
| tree | 947cd280c316bb7371061b3373d39011497b9c5c | |
| parent | cda9145b0018ed1fd30847bed2cbd690c31ac09f (diff) | |
| parent | 9acb9fa57b64ed606638f74da908abebc1e9f99e (diff) | |
| download | rust-496b073257855380eaf057dc43e65030c0fb9e64.tar.gz rust-496b073257855380eaf057dc43e65030c0fb9e64.zip | |
Sync from rust 9a1d156f38c51441ee51e5a068f1d0caf4bb0f27
| -rw-r--r-- | src/abi/mod.rs | 6 | ||||
| -rw-r--r-- | src/base.rs | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/abi/mod.rs b/src/abi/mod.rs index 2466bfe60c7..2c99597922e 100644 --- a/src/abi/mod.rs +++ b/src/abi/mod.rs @@ -65,7 +65,11 @@ pub(crate) fn conv_to_call_conv(sess: &Session, c: Conv, default_call_conv: Call sess.dcx().fatal("C-cmse-nonsecure-entry call conv is not yet implemented"); } - Conv::Msp430Intr | Conv::PtxKernel | Conv::AvrInterrupt | Conv::AvrNonBlockingInterrupt => { + Conv::Msp430Intr + | Conv::PtxKernel + | Conv::GpuKernel + | Conv::AvrInterrupt + | Conv::AvrNonBlockingInterrupt => { unreachable!("tried to use {c:?} call conv which only exists on an unsupported target"); } } diff --git a/src/base.rs b/src/base.rs index 956a024fa4d..34066eb83fc 100644 --- a/src/base.rs +++ b/src/base.rs @@ -828,6 +828,12 @@ fn codegen_stmt<'tcx>( fx.bcx.ins().nop(); } } + Rvalue::Len(place) => { + let place = codegen_place(fx, place); + let usize_layout = fx.layout_of(fx.tcx.types.usize); + let len = codegen_array_len(fx, place); + lval.write_cvalue(fx, CValue::by_val(len, usize_layout)); + } Rvalue::ShallowInitBox(ref operand, content_ty) => { let content_ty = fx.monomorphize(content_ty); let box_layout = fx.layout_of(Ty::new_box(fx.tcx, content_ty)); |
