summary refs log tree commit diff
path: root/library
diff options
context:
space:
mode:
authorRémy Rakic <remy.rakic+github@gmail.com>2025-01-18 22:08:38 +0000
committerJosh Stone <jistone@redhat.com>2025-02-06 09:53:26 -0800
commit7302b302d08e3d884d75a688a5a38c53be78bd87 (patch)
treec4aff59683135db350d8d6ef1c5b5f98eeedc91a /library
parent13c3f9b9498013837782b46120085ea19ca75518 (diff)
downloadrust-7302b302d08e3d884d75a688a5a38c53be78bd87.tar.gz
rust-7302b302d08e3d884d75a688a5a38c53be78bd87.zip
Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper"
This reverts commit e108481f74ff123ad98a63bd107a18d13035b275, reversing
changes made to 303e8bd768526a5812bb1776e798e829ddb7d3ca.

(cherry picked from commit ca1c17c88d1f625763859396ba7a50f36ac45cc0)
Diffstat (limited to 'library')
-rw-r--r--library/core/src/intrinsics/mir.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/intrinsics/mir.rs b/library/core/src/intrinsics/mir.rs
index 834f44c7790..55dcf7cd47e 100644
--- a/library/core/src/intrinsics/mir.rs
+++ b/library/core/src/intrinsics/mir.rs
@@ -233,7 +233,7 @@
 //!
 //!  - Operands implicitly convert to `Use` rvalues.
 //!  - `&`, `&mut`, `addr_of!`, and `addr_of_mut!` all work to create their associated rvalue.
-//!  - [`Discriminant`] and [`CopyForDeref`] have associated functions.
+//!  - [`Discriminant`], [`Len`], and [`CopyForDeref`] have associated functions.
 //!  - Unary and binary operations use their normal Rust syntax - `a * b`, `!c`, etc.
 //!  - The binary operation `Offset` can be created via [`Offset`].
 //!  - Checked binary operations are represented by wrapping the associated binop in [`Checked`].
@@ -401,6 +401,7 @@ define!("mir_storage_dead", fn StorageDead<T>(local: T));
 define!("mir_assume", fn Assume(operand: bool));
 define!("mir_deinit", fn Deinit<T>(place: T));
 define!("mir_checked", fn Checked<T>(binop: T) -> (T, bool));
+define!("mir_len", fn Len<T>(place: T) -> usize);
 define!(
     "mir_ptr_metadata",
     fn PtrMetadata<P: ?Sized>(place: *const P) -> <P as ::core::ptr::Pointee>::Metadata