CTFE: exposing pointers and calling extern fn doesn't need an RFC, it is just impossible
This commit is contained in:
parent
ee285eab69
commit
a9f9145b09
4 changed files with 8 additions and 5 deletions
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue