rust/compiler/rustc_mir_build
Matthias Krüger 21ddd7ab89
Rollup merge of #135748 - compiler-errors:len-2, r=RalfJung,oli-obk
Lower index bounds checking to `PtrMetadata`, this time with the right fake borrow semantics 😸

Change `Rvalue::RawRef` to take a `RawRefKind` instead of just a `Mutability`. Then introduce `RawRefKind::FakeForPtrMetadata` and use that for lowering index bounds checking to a `PtrMetadata`. This new `RawRefKind::FakeForPtrMetadata` acts like a shallow fake borrow in borrowck, which mimics the semantics of the old `Rvalue::Len` operation we're replacing.

We can then use this `RawRefKind` instead of using a span desugaring hack in CTFE.

cc ``@scottmcm`` ``@RalfJung``
2025-01-28 14:23:22 +01:00
..
src Rollup merge of #135748 - compiler-errors:len-2, r=RalfJung,oli-obk 2025-01-28 14:23:22 +01:00
Cargo.toml mir_build: check annotated functions w/out callers 2025-01-10 18:37:57 +00:00
messages.ftl Use short ty string for move errors 2025-01-24 18:12:56 +00:00