Skip to content

Commit 4b3f235

Browse files
committed
Auto merge of rust-lang#107328 - matthiaskrgr:rollup-lfqwo0o, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang#106904 (Preserve split DWARF files when building archives.) - rust-lang#106971 (Handle diagnostics customization on the fluent side (for one specific diagnostic)) - rust-lang#106978 (Migrate mir_build's borrow conflicts) - rust-lang#107150 (`ty::tls` cleanups) - rust-lang#107168 (Use a type-alias-impl-trait in `ObligationForest`) - rust-lang#107189 (Encode info for Adt in a single place.) - rust-lang#107322 (Custom mir: Add support for some remaining, easy to support constructs) - rust-lang#107323 (Disable ConstGoto opt in cleanup blocks) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 8bbc29d + 961812b commit 4b3f235

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

core/src/intrinsics/mir.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,16 @@
211211
//!
212212
//! #### Statements
213213
//! - Assign statements work via normal Rust assignment.
214-
//! - [`Retag`] statements have an associated function.
214+
//! - [`Retag`], [`StorageLive`], [`StorageDead`], [`Deinit`] statements have an associated function.
215215
//!
216216
//! #### Rvalues
217217
//!
218218
//! - Operands implicitly convert to `Use` rvalues.
219219
//! - `&`, `&mut`, `addr_of!`, and `addr_of_mut!` all work to create their associated rvalue.
220-
//! - [`Discriminant`] has an associated function.
220+
//! - [`Discriminant`] and [`Len`] have associated functions.
221+
//! - Unary and binary operations use their normal Rust syntax - `a * b`, `!c`, etc.
222+
//! - Checked binary operations are represented by wrapping the associated binop in [`Checked`].
223+
//! - Array repetition syntax (`[foo; 10]`) creates the associated rvalue.
221224
//!
222225
//! #### Terminators
223226
//!
@@ -261,6 +264,9 @@ define!("mir_drop_and_replace", fn DropAndReplace<T>(place: T, value: T, goto: B
261264
define!("mir_call", fn Call<T>(place: T, goto: BasicBlock, call: T));
262265
define!("mir_storage_live", fn StorageLive<T>(local: T));
263266
define!("mir_storage_dead", fn StorageDead<T>(local: T));
267+
define!("mir_deinit", fn Deinit<T>(place: T));
268+
define!("mir_checked", fn Checked<T>(binop: T) -> (T, bool));
269+
define!("mir_len", fn Len<T>(place: T) -> usize);
264270
define!("mir_retag", fn Retag<T>(place: T));
265271
define!("mir_move", fn Move<T>(place: T) -> T);
266272
define!("mir_static", fn Static<T>(s: T) -> &'static T);

0 commit comments

Comments
 (0)