rust/compiler/rustc_middle/src
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
..
dep_graph Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
hir Auto merge of #134478 - compiler-errors:attr-span, r=oli-obk 2025-01-22 14:46:41 +00:00
hooks Move some code from Compiler::enter to GlobalCtxt::finish 2024-11-09 17:55:39 +00:00
infer remove non-borrowck member constraints 2024-12-20 10:04:01 +01:00
middle Rename OptimizeAttr::None to Default 2025-01-24 19:34:01 +00:00
mir Rollup merge of #135748 - compiler-errors:len-2, r=RalfJung,oli-obk 2025-01-28 14:23:22 +01:00
query Change collect_and_partition_mono_items tuple return type to a struct 2025-01-27 09:38:12 +00:00
thir Introduce default_field_values feature 2024-12-09 21:55:01 +00:00
traits remove support for the #[start] attribute 2025-01-21 06:59:15 -07:00
ty Rollup merge of #136114 - compiler-errors:more-idents, r=jieyouxu 2025-01-27 15:38:30 +01:00
util Assert that Instance::try_resolve is only used on body-like things 2025-01-13 02:20:08 +00:00
arena.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
error.rs Add TooGeneric variant to LayoutError and emit Unknown one 2025-01-27 00:37:34 +01:00
lib.rs use fmt::from_fn in more places, instead of using structs that impl formatting traits 2025-01-24 14:45:56 +00:00
lint.rs make it possible to silence linker warnings with a crate-level attribute 2025-01-20 16:46:00 -05:00
macros.rs Improve const traits diagnostics for new desugaring 2024-10-02 19:45:17 +08:00
metadata.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs Introduce default_field_values feature 2024-12-09 21:55:01 +00:00
values.rs Split hir TyKind and ConstArgKind in two and update hir::Visitor 2025-01-23 06:01:36 +00:00