diff options
| author | bors <bors@rust-lang.org> | 2024-09-22 10:18:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-09-22 10:18:59 +0000 |
| commit | 4ae36d906f7f509e63aaa7ea99fdbefd1463eb96 (patch) | |
| tree | d6ab8fa100c8469e3416ea9e74f178772571d727 /compiler/rustc_const_eval/src | |
| parent | 80aa6fa7314bddcfe95a68f4eb426b296bfdf4a9 (diff) | |
| parent | 8103505a4d9bcef3eb5715a41cc0eb08d92c05d5 (diff) | |
| download | rust-4ae36d906f7f509e63aaa7ea99fdbefd1463eb96.tar.gz rust-4ae36d906f7f509e63aaa7ea99fdbefd1463eb96.zip | |
Auto merge of #130689 - RalfJung:rustc_nonnull_optimization_guaranteed, r=jieyouxu
fix rustc_nonnull_optimization_guaranteed docs As far as I can tell, even back when this was [added](https://github.com/rust-lang/rust/pull/60300) it never *enabled* any optimizations. It just indicates that the FFI compat lint should accept those types for NPO.
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/call.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs index 0f2b22f035b..97f7242b336 100644 --- a/compiler/rustc_const_eval/src/interpret/call.rs +++ b/compiler/rustc_const_eval/src/interpret/call.rs @@ -234,6 +234,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { // so we implement a type-based check that reflects the guaranteed rules for ABI compatibility. if self.layout_compat(caller_abi.layout, callee_abi.layout)? { // Ensure that our checks imply actual ABI compatibility for this concrete call. + // (This can fail e.g. if `#[rustc_nonnull_optimization_guaranteed]` is used incorrectly.) assert!(caller_abi.eq_abi(callee_abi)); Ok(true) } else { |
