Skip to content

Commit bfde22e

Browse files
committed
(c2rust-analyze) Error immediately rather than continue and later error on global const refs.
1 parent 6c8f65c commit bfde22e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

c2rust-analyze/src/main.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,10 @@ fn label_rvalue_tys<'tcx>(acx: &mut AnalysisCtxt<'_, 'tcx>, mir: &Body<'tcx>) {
411411
acx.const_ref_locs.push(loc);
412412
acx.assign_pointer_ids(ty)
413413
}
414-
ConstantKind::Ty(_) => {
415-
// TODO: Handle global, named `const`s.
416-
continue;
414+
ConstantKind::Ty(ty) => {
415+
::log::error!(
416+
"TODO: handle global, named `const` refs: {c:?}, ty = {ty:?}"
417+
);
417418
}
418419
}
419420
}

0 commit comments

Comments
 (0)