remove an unnecessary use of loc_place.ptr.into_pointer_or_addr
This commit is contained in:
parent
c83241a7f9
commit
55f0977a6b
@ -38,7 +38,7 @@ pub(crate) fn const_caller_location(
|
||||
if intern_const_alloc_recursive(&mut ecx, InternKind::Constant, &loc_place).is_err() {
|
||||
bug!("intern_const_alloc_recursive should not error in this case")
|
||||
}
|
||||
ConstValue::Scalar(Scalar::from_pointer(loc_place.ptr.into_pointer_or_addr().unwrap(), &tcx))
|
||||
ConstValue::Scalar(Scalar::from_maybe_pointer(loc_place.ptr, &tcx))
|
||||
}
|
||||
|
||||
/// Convert an evaluated constant to a type level constant
|
||||
|
Loading…
x
Reference in New Issue
Block a user