about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-08-29 21:12:57 +0200
committerGitHub <noreply@github.com>2022-08-29 21:12:57 +0200
commitcd53b4dba535f1fa5ded91595d8aacaf3aef075d (patch)
tree737a8317acab5baf07c89c3d1b7c18094ca1c9eb /compiler/rustc_const_eval/src/interpret
parentecd908ac5e0f91923f4b0915a7ac04d7909d6e8e (diff)
parentf29c3c421b9fd2afb52062590c5f2e052f8d3815 (diff)
downloadrust-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.rs1
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))
     }