Skip to content

Commit 012c46f

Browse files
committed
(c2rust-analyze) Forgot to actually add the const ref Locations to const_ref_locs.
1 parent 57dd358 commit 012c46f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

c2rust-analyze/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ pub struct AnalysisCtxt<'a, 'tcx> {
115115
pub rvalue_tys: HashMap<Location, LTy<'tcx>>,
116116

117117
/// [`Location`]s of const ref [`rvalue_tys`](Self::rvalue_tys).
118-
const_ref_locs: Vec<Location>,
118+
pub const_ref_locs: Vec<Location>,
119119

120120
next_ptr_id: NextLocalPointerId,
121121
}

c2rust-analyze/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ fn label_rvalue_tys<'tcx>(acx: &mut AnalysisCtxt<'_, 'tcx>, mir: &Body<'tcx>) {
403403
// The [`Constant`] is an inline value and thus local to this function,
404404
// as opposed to a global, named `const`s, for example.
405405
// This might miss local, named `const`s,
406+
acx.const_ref_locs.push(loc);
406407
acx.assign_pointer_ids(ty)
407408
} else {
408409
// TODO: Handle global, named `const`s.

0 commit comments

Comments
 (0)