@@ -35,6 +35,7 @@ use super::{
35
35
Machine , MemPlaceMeta , PlaceTy , Pointer , Projectable , Scalar , ValueVisitor , err_ub,
36
36
format_interp_error,
37
37
} ;
38
+ use crate :: enter_trace_span;
38
39
39
40
// for the validation errors
40
41
#[ rustfmt:: skip]
@@ -1382,6 +1383,8 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
1382
1383
ref_tracking : & mut RefTracking < MPlaceTy < ' tcx , M :: Provenance > , Vec < PathElem > > ,
1383
1384
ctfe_mode : CtfeValidationMode ,
1384
1385
) -> InterpResult < ' tcx > {
1386
+ let _span = enter_trace_span ! ( M , "const_validate_operand" , "path={path:?}, val={val:?}" ) ;
1387
+
1385
1388
self . validate_operand_internal (
1386
1389
val,
1387
1390
path,
@@ -1401,6 +1404,12 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
1401
1404
recursive : bool ,
1402
1405
reset_provenance_and_padding : bool ,
1403
1406
) -> InterpResult < ' tcx > {
1407
+ let _span = enter_trace_span ! (
1408
+ M ,
1409
+ "validate_operand" ,
1410
+ "recursive={recursive}, reset_provenance_and_padding={reset_provenance_and_padding}, val={val:?}"
1411
+ ) ;
1412
+
1404
1413
// Note that we *could* actually be in CTFE here with `-Zextra-const-ub-checks`, but it's
1405
1414
// still correct to not use `ctfe_mode`: that mode is for validation of the final constant
1406
1415
// value, it rules out things like `UnsafeCell` in awkward places.
0 commit comments