@@ -15,9 +15,11 @@ pub use std::*;
15
15
// Bind `core::assert` to a different name to avoid possible name conflicts if a
16
16
// crate uses `extern crate std as core`. See
17
17
// https://github.com/model-checking/kani/issues/1949
18
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
18
19
#[ allow( unused_imports) ]
19
20
use core:: assert as __kani__workaround_core_assert;
20
21
22
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
21
23
// Override process calls with stubs.
22
24
pub mod process;
23
25
@@ -41,6 +43,7 @@ pub mod process;
41
43
/// ```
42
44
/// the assert message will be:
43
45
/// "The sum of {} and {} is {}", a, b, c
46
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
44
47
#[ macro_export]
45
48
macro_rules! assert {
46
49
( $cond: expr $( , ) ?) => {
@@ -77,6 +80,7 @@ macro_rules! assert {
77
80
// (see https://github.com/model-checking/kani/issues/13)
78
81
// 3. Call kani::assert so that any instrumentation that it does (e.g. injecting
79
82
// reachability checks) is done for assert_eq and assert_ne
83
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
80
84
#[ macro_export]
81
85
macro_rules! assert_eq {
82
86
( $left: expr, $right: expr $( , ) ?) => ( {
@@ -89,6 +93,7 @@ macro_rules! assert_eq {
89
93
} ) ;
90
94
}
91
95
96
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
92
97
#[ macro_export]
93
98
macro_rules! assert_ne {
94
99
( $left: expr, $right: expr $( , ) ?) => ( {
@@ -102,45 +107,53 @@ macro_rules! assert_ne {
102
107
}
103
108
104
109
// Treat the debug assert macros same as non-debug ones
110
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
105
111
#[ macro_export]
106
112
macro_rules! debug_assert {
107
113
( $( $x: tt) * ) => ( { $crate:: assert!( $( $x) * ) ; } )
108
114
}
109
115
116
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
110
117
#[ macro_export]
111
118
macro_rules! debug_assert_eq {
112
119
( $( $x: tt) * ) => ( { $crate:: assert_eq!( $( $x) * ) ; } )
113
120
}
114
121
122
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
115
123
#[ macro_export]
116
124
macro_rules! debug_assert_ne {
117
125
( $( $x: tt) * ) => ( { $crate:: assert_ne!( $( $x) * ) ; } )
118
126
}
119
127
120
128
// Override the print macros to skip all the printing functionality (which
121
129
// is not relevant for verification)
130
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
122
131
#[ macro_export]
123
132
macro_rules! print {
124
133
( $( $x: tt) * ) => { { let _ = format_args!( $( $x) * ) ; } } ;
125
134
}
126
135
136
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
127
137
#[ macro_export]
128
138
macro_rules! eprint {
129
139
( $( $x: tt) * ) => { { let _ = format_args!( $( $x) * ) ; } } ;
130
140
}
131
141
142
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
132
143
#[ macro_export]
133
144
macro_rules! println {
134
145
( ) => { } ;
135
146
( $( $x: tt) * ) => { { let _ = format_args!( $( $x) * ) ; } } ;
136
147
}
137
148
149
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
138
150
#[ macro_export]
139
151
macro_rules! eprintln {
140
152
( ) => { } ;
141
153
( $( $x: tt) * ) => { { let _ = format_args!( $( $x) * ) ; } } ;
142
154
}
143
155
156
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
144
157
#[ macro_export]
145
158
macro_rules! unreachable {
146
159
// The argument, if present, is a literal that represents the error message, i.e.:
@@ -171,6 +184,7 @@ macro_rules! unreachable {
171
184
stringify!( $fmt, $( $arg) * ) ) ) } } ;
172
185
}
173
186
187
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
174
188
#[ macro_export]
175
189
macro_rules! panic {
176
190
// No argument is given.
0 commit comments