rust/compiler/rustc_borrowck
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
..
src Rollup merge of #130514 - compiler-errors:unsafe-binders, r=oli-obk 2025-02-01 16:41:03 +01:00
Cargo.toml compiler: Replace rustc_target with _abi in _borrowck 2024-11-02 20:31:47 -07:00
messages.ftl Use short ty string for move errors 2025-01-24 18:12:56 +00:00