rust/compiler/rustc_codegen_ssa/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
..
back Change collect_and_partition_mono_items tuple return type to a struct 2025-01-27 09:38:12 +00:00
debuginfo Begin to implement type system layer of unsafe binders 2024-12-22 21:57:57 +00:00
mir Represent the raw pointer for a array length check as a new kind of fake borrow 2025-01-28 00:00:33 +00:00
traits Rollup merge of #135581 - EnzymeAD:refactor-codgencx, r=oli-obk 2025-01-24 23:25:42 +01:00
assert_module_sources.rs Change collect_and_partition_mono_items tuple return type to a struct 2025-01-27 09:38:12 +00:00
base.rs Change collect_and_partition_mono_items tuple return type to a struct 2025-01-27 09:38:12 +00:00
codegen_attrs.rs Rename OptimizeAttr::None to Default 2025-01-24 19:34:01 +00:00
common.rs Test fixing raw-dylib 2024-09-24 10:10:31 -07:00
errors.rs Shorten linker output even more when --verbose is not present 2025-01-25 16:04:52 -05:00
lib.rs make it possible to silence linker warnings with a crate-level attribute 2025-01-20 16:46:00 -05:00
meth.rs compiler: Directly use rustc_abi in codegen 2024-11-03 12:30:32 -08:00
mono_item.rs codegen #[naked] functions using global_asm! 2024-12-10 21:41:03 +01:00
size_of_val.rs compiler: Directly use rustc_abi in codegen 2024-11-03 12:30:32 -08:00
target_features.rs add dedicated type for ABI target feature constraints 2025-01-05 10:46:30 +01:00