Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper"
This reverts commite108481f74
, reversing changes made to303e8bd768
.
This commit is contained in:
parent
efc25761e5
commit
ca1c17c88d
37 changed files with 272 additions and 51 deletions
|
@ -1351,6 +1351,16 @@ pub enum Rvalue<'tcx> {
|
|||
/// model.
|
||||
RawPtr(Mutability, Place<'tcx>),
|
||||
|
||||
/// Yields the length of the place, as a `usize`.
|
||||
///
|
||||
/// If the type of the place is an array, this is the array length. For slices (`[T]`, not
|
||||
/// `&[T]`) this accesses the place's metadata to determine the length. This rvalue is
|
||||
/// ill-formed for places of other types.
|
||||
///
|
||||
/// This cannot be a `UnOp(PtrMetadata, _)` because that expects a value, and we only
|
||||
/// have a place, and `UnOp(PtrMetadata, RawPtr(place))` is not a thing.
|
||||
Len(Place<'tcx>),
|
||||
|
||||
/// Performs essentially all of the casts that can be performed via `as`.
|
||||
///
|
||||
/// This allows for casts from/to a variety of types.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue