rust/compiler/rustc_const_eval/src/interpret
Matthias Krüger 2fd3007cbc
Rollup merge of #130514 - compiler-errors:unsafe-binders, r=oli-obk
Implement MIR lowering for unsafe binders

This is the final bit of the unsafe binders puzzle. It implements MIR, CTFE, and codegen for unsafe binders, and enforces that (for now) they are `Copy`. Later on, I'll introduce a new trait that relaxes this requirement to being "is `Copy` or `ManuallyDrop<T>`" which more closely models how we treat union fields.

Namely, wrapping unsafe binders is now `Rvalue::WrapUnsafeBinder`, which acts much like an `Rvalue::Aggregate`. Unwrapping unsafe binders are implemented as a MIR projection `ProjectionElem::UnwrapUnsafeBinder`, which acts much like `ProjectionElem::Field`.

Tracking:
- https://github.com/rust-lang/rust/issues/130516
2025-02-01 16:41:03 +01:00
..
call.rs More assertions, tests, and miri coverage 2025-01-30 17:44:28 +00:00
cast.rs More assertions, tests, and miri coverage 2025-01-30 17:44:28 +00:00
discriminant.rs make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00
eval_context.rs fix ICE on type error in promoted 2024-12-09 15:17:26 +01:00
intern.rs InterpCx store TypingEnv instead of a ParamEnv 2024-11-19 21:36:23 +01:00
intrinsics.rs miri: make float min/max non-deterministic 2025-01-31 11:56:02 +01:00
machine.rs miri: make float min/max non-deterministic 2025-01-31 11:56:02 +01:00
memory.rs Auto merge of #136035 - SpecificProtagonist:miri-zeroed-alloc, r=oli-obk 2025-01-30 01:27:21 +00:00
mod.rs make return type of get_alloc_info a struct, and reduce some code duplication with validity checking 2024-11-09 15:18:52 +01:00
operand.rs Avoid naming variables str 2025-01-07 14:30:02 +02:00
operator.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
place.rs miri: optimize zeroed alloc 2025-01-28 12:50:02 +01:00
projection.rs Implement MIR, CTFE, and codegen for unsafe binders 2025-01-31 17:19:53 +00:00
stack.rs Begin to implement type system layer of unsafe binders 2024-12-22 21:57:57 +00:00
step.rs Validation 2025-01-31 17:40:28 +00:00
traits.rs Do not treat vtable supertraits as distinct when bound with different bound vars 2025-01-30 15:33:58 +00:00
util.rs miri: optimize zeroed alloc 2025-01-28 12:50:02 +01:00
validity.rs Begin to implement type system layer of unsafe binders 2024-12-22 21:57:57 +00:00
visitor.rs make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00