diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-08-29 21:12:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-29 21:12:57 +0200 |
| commit | cd53b4dba535f1fa5ded91595d8aacaf3aef075d (patch) | |
| tree | 737a8317acab5baf07c89c3d1b7c18094ca1c9eb /compiler/rustc_const_eval/src/interpret | |
| parent | ecd908ac5e0f91923f4b0915a7ac04d7909d6e8e (diff) | |
| parent | f29c3c421b9fd2afb52062590c5f2e052f8d3815 (diff) | |
| download | rust-cd53b4dba535f1fa5ded91595d8aacaf3aef075d.tar.gz rust-cd53b4dba535f1fa5ded91595d8aacaf3aef075d.zip | |
Rollup merge of #101131 - RalfJung:ctfe-no-needs-rfc, r=oli-obk
CTFE: exposing pointers and calling extern fn is just impossible The remaining "needs RFC" errors are just needlessly confusing, I think -- time to get rid of that error variant. They are anyway only reachable with miri-unleashed (if at all). r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/machine.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/machine.rs b/compiler/rustc_const_eval/src/interpret/machine.rs index 6bed8a7a007..8df6737b839 100644 --- a/compiler/rustc_const_eval/src/interpret/machine.rs +++ b/compiler/rustc_const_eval/src/interpret/machine.rs @@ -490,6 +490,7 @@ pub macro compile_time_machine(<$mir: lifetime, $tcx: lifetime>) { ) -> InterpResult<$tcx, Pointer<Option<AllocId>>> { // Allow these casts, but make the pointer not dereferenceable. // (I.e., they behave like transmutation.) + // This is correct because no pointers can ever be exposed in compile-time evaluation. Ok(Pointer::from_addr(addr)) } |
