mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Rollup merge of #129939 - RalfJung:rvalue-len, r=compiler-errors
explain why Rvalue::Len still exists I just spent a bit of time trying to remove this until I realized why that's non-trivial. Let's document that for the next person. :)
This commit is contained in:
commit
2efefe68b2
@ -1307,6 +1307,9 @@ pub enum Rvalue<'tcx> {
|
||||
/// 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`.
|
||||
|
Loading…
Reference in New Issue
Block a user