Skip to content

Commit 70e8b82

Browse files
committed
const_caller_location: edit FIXME to explain use of
1 parent e9385f9 commit 70e8b82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_const_eval/src/util/caller_location.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ pub(crate) fn const_caller_location_provider(
6161
trace!("const_caller_location: {}:{}:{}", file, line, col);
6262
let mut ecx = mk_eval_cx_to_read_const_val(
6363
tcx,
64-
rustc_span::DUMMY_SP, // FIXME: use a proper span here?
64+
rustc_span::DUMMY_SP, // This interpreter cannot fail, so the span is irrelevant
6565
ty::TypingEnv::fully_monomorphized(),
6666
CanAccessMutGlobal::No,
6767
);
6868

6969
let loc_place = alloc_caller_location(&mut ecx, file, line, col);
7070
if intern_const_alloc_recursive(&mut ecx, InternKind::Constant, &loc_place).is_err() {
71-
bug!("intern_const_alloc_recursive should not error in this case")
71+
bug!("intern_const_alloc_recursive should not error in const_caller_location_provider")
7272
}
7373
mir::ConstValue::Scalar(Scalar::from_maybe_pointer(loc_place.ptr(), &tcx))
7474
}

0 commit comments

Comments
 (0)