diff options
| author | Ralf Jung <post@ralfj.de> | 2025-07-17 20:00:19 +0200 | 
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-07-30 08:13:58 +0200 | 
| commit | ba5b6b9ec472dc32bdaa8b18c22d30bd6abf7ebc (patch) | |
| tree | 212b535aaa7414d1336c8817dc8db1a0adbd670c /compiler/rustc_const_eval/src/interpret/place.rs | |
| parent | 051d0e8a957c98f87ddaf6295c3a3ecd88742ff9 (diff) | |
| download | rust-ba5b6b9ec472dc32bdaa8b18c22d30bd6abf7ebc.tar.gz rust-ba5b6b9ec472dc32bdaa8b18c22d30bd6abf7ebc.zip | |
const-eval: full support for pointer fragments
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/place.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/place.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/compiler/rustc_const_eval/src/interpret/place.rs b/compiler/rustc_const_eval/src/interpret/place.rs index e2284729efd..afd96a7c0c9 100644 --- a/compiler/rustc_const_eval/src/interpret/place.rs +++ b/compiler/rustc_const_eval/src/interpret/place.rs @@ -700,7 +700,7 @@ where match value { Immediate::Scalar(scalar) => { - alloc.write_scalar(alloc_range(Size::ZERO, scalar.size()), scalar) + alloc.write_scalar(alloc_range(Size::ZERO, scalar.size()), scalar)?; } Immediate::ScalarPair(a_val, b_val) => { let BackendRepr::ScalarPair(a, b) = layout.backend_repr else { @@ -720,10 +720,10 @@ where alloc.write_scalar(alloc_range(Size::ZERO, a_val.size()), a_val)?; alloc.write_scalar(alloc_range(b_offset, b_val.size()), b_val)?; // We don't have to reset padding here, `write_immediate` will anyway do a validation run. - interp_ok(()) } Immediate::Uninit => alloc.write_uninit_full(), } + interp_ok(()) } pub fn write_uninit( @@ -743,7 +743,7 @@ where // Zero-sized access return interp_ok(()); }; - alloc.write_uninit_full()?; + alloc.write_uninit_full(); } } interp_ok(()) @@ -767,7 +767,7 @@ where // Zero-sized access return interp_ok(()); }; - alloc.clear_provenance()?; + alloc.clear_provenance(); } } interp_ok(()) | 
