improve error message for disallowed ptr-to-int casts in const eval
This commit is contained in:
@@ -352,7 +352,7 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for CompileTimeInterpreter<'mir,
|
||||
}
|
||||
|
||||
fn ptr_to_int(_mem: &Memory<'mir, 'tcx, Self>, _ptr: Pointer) -> InterpResult<'tcx, u64> {
|
||||
Err(ConstEvalErrKind::NeedsRfc("pointer-to-integer cast".to_string()).into())
|
||||
Err(ConstEvalErrKind::PtrToIntCast.into())
|
||||
}
|
||||
|
||||
fn binary_ptr_op(
|
||||
|
||||
Reference in New Issue
Block a user