Skip to content

Commit bb1d1af

Browse files
committed
Add tracing to validate_operand
1 parent 625f8ee commit bb1d1af

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler/rustc_const_eval/src/interpret/validity.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ use super::{
3535
Machine, MemPlaceMeta, PlaceTy, Pointer, Projectable, Scalar, ValueVisitor, err_ub,
3636
format_interp_error,
3737
};
38+
use crate::enter_trace_span;
3839

3940
// for the validation errors
4041
#[rustfmt::skip]
@@ -1401,6 +1402,12 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
14011402
recursive: bool,
14021403
reset_provenance_and_padding: bool,
14031404
) -> InterpResult<'tcx> {
1405+
let _span = enter_trace_span!(
1406+
M,
1407+
"validate_operand",
1408+
"recursive={recursive}, reset_provenance_and_padding={reset_provenance_and_padding}, val={val:?}"
1409+
);
1410+
14041411
// Note that we *could* actually be in CTFE here with `-Zextra-const-ub-checks`, but it's
14051412
// still correct to not use `ctfe_mode`: that mode is for validation of the final constant
14061413
// value, it rules out things like `UnsafeCell` in awkward places.

0 commit comments

Comments
 (0)