Skip to content

Commit 55f0977

Browse files
committed
remove an unnecessary use of loc_place.ptr.into_pointer_or_addr
1 parent c83241a commit 55f0977

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_const_eval/src/const_eval

1 file changed

+1
-1
lines changed

compiler/rustc_const_eval/src/const_eval/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub(crate) fn const_caller_location(
3838
if intern_const_alloc_recursive(&mut ecx, InternKind::Constant, &loc_place).is_err() {
3939
bug!("intern_const_alloc_recursive should not error in this case")
4040
}
41-
ConstValue::Scalar(Scalar::from_pointer(loc_place.ptr.into_pointer_or_addr().unwrap(), &tcx))
41+
ConstValue::Scalar(Scalar::from_maybe_pointer(loc_place.ptr, &tcx))
4242
}
4343

4444
/// Convert an evaluated constant to a type level constant

0 commit comments

Comments
 (0)