diff options
| author | Ralf Jung <post@ralfj.de> | 2022-04-18 12:47:38 -0400 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-04-18 12:47:38 -0400 |
| commit | 55f0977a6baee4a3469826a45ee1308a65498129 (patch) | |
| tree | c31693af2b885583ba832b273e705533a1afa524 /compiler/rustc_const_eval | |
| parent | c83241a7f9ca77acfe0264b4d42a0f915b0a5a34 (diff) | |
| download | rust-55f0977a6baee4a3469826a45ee1308a65498129.tar.gz rust-55f0977a6baee4a3469826a45ee1308a65498129.zip | |
remove an unnecessary use of loc_place.ptr.into_pointer_or_addr
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/mod.rs b/compiler/rustc_const_eval/src/const_eval/mod.rs index 80270f82563..68f9bee593f 100644 --- a/compiler/rustc_const_eval/src/const_eval/mod.rs +++ b/compiler/rustc_const_eval/src/const_eval/mod.rs @@ -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 |
