Skip to content

Commit 782d00b

Browse files
authored
Rollup merge of #111587 - cbeuw:copy-for-deref, r=oli-obk
Custom MIR: Support `Rvalue::CopyForDeref` r? `@oli-obk` or `@tmiasko` or `@JakobDegen`
2 parents 881fb77 + d1e6d13 commit 782d00b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/intrinsics/mir.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
//!
229229
//! - Operands implicitly convert to `Use` rvalues.
230230
//! - `&`, `&mut`, `addr_of!`, and `addr_of_mut!` all work to create their associated rvalue.
231-
//! - [`Discriminant`] and [`Len`] have associated functions.
231+
//! - [`Discriminant`], [`Len`], and [`CopyForDeref`] have associated functions.
232232
//! - Unary and binary operations use their normal Rust syntax - `a * b`, `!c`, etc.
233233
//! - The binary operation `Offset` can be created via [`Offset`].
234234
//! - Checked binary operations are represented by wrapping the associated binop in [`Checked`].
@@ -279,6 +279,7 @@ define!("mir_storage_dead", fn StorageDead<T>(local: T));
279279
define!("mir_deinit", fn Deinit<T>(place: T));
280280
define!("mir_checked", fn Checked<T>(binop: T) -> (T, bool));
281281
define!("mir_len", fn Len<T>(place: T) -> usize);
282+
define!("mir_copy_for_deref", fn CopyForDeref<T>(place: T) -> T);
282283
define!("mir_retag", fn Retag<T>(place: T));
283284
define!("mir_move", fn Move<T>(place: T) -> T);
284285
define!("mir_static", fn Static<T>(s: T) -> &'static T);

0 commit comments

Comments
 (0)