File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1014,8 +1014,6 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
1014
1014
1015
1015
const PANIC_ON_ALLOC_FAIL : bool = false ;
1016
1016
1017
- const TRACING_ENABLED : bool = cfg ! ( feature = "tracing" ) ;
1018
-
1019
1017
#[ inline( always) ]
1020
1018
fn enforce_alignment ( ecx : & MiriInterpCx < ' tcx > ) -> bool {
1021
1019
ecx. machine . check_alignment != AlignmentCheck :: None
@@ -1827,6 +1825,16 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
1827
1825
#[ cfg( not( target_os = "linux" ) ) ]
1828
1826
MiriAllocParams :: Global
1829
1827
}
1828
+
1829
+ fn enter_trace_span ( span : impl FnOnce ( ) -> tracing:: Span ) -> impl EnteredTraceSpan {
1830
+ #[ cfg( feature = "tracing" ) ]
1831
+ { span ( ) . entered ( ) }
1832
+ #[ cfg( not( feature = "tracing" ) ) ]
1833
+ {
1834
+ let _ = span; // so we avoid the "unused variable" warning
1835
+ ( )
1836
+ }
1837
+ }
1830
1838
}
1831
1839
1832
1840
/// Trait for callbacks handling asynchronous machine operations.
You can’t perform that action at this time.
0 commit comments