@@ -61,14 +61,7 @@ macro_rules! assert {
61
61
// strategy, which is tracked in
62
62
// https://github.com/model-checking/kani/issues/692
63
63
if false {
64
- #[ cfg( not( feature = "std" ) ) ]
65
64
__kani__workaround_core_assert!( true , $( $arg) +) ;
66
- // In a `no_std` setting where `std` is used as a feature, defining
67
- // the alias for `core::assert` doesn't work, so we need to use
68
- // `core::assert` directly (see
69
- // https://github.com/model-checking/kani/issues/2187)
70
- #[ cfg( feature = "std" ) ]
71
- core:: assert!( true , $( $arg) +) ;
72
65
}
73
66
} } ;
74
67
}
@@ -172,11 +165,7 @@ macro_rules! unreachable {
172
165
// handle.
173
166
( $fmt: expr, $( $arg: tt) * ) => { {
174
167
if false {
175
- #[ cfg( not( feature = "std" ) ) ]
176
168
__kani__workaround_core_assert!( true , $fmt, $( $arg) +) ;
177
- // See comment in `assert` definition
178
- #[ cfg( feature = "std" ) ]
179
- core:: assert!( true , $fmt, $( $arg) +) ;
180
169
}
181
170
kani:: panic( concat!( "internal error: entered unreachable code: " ,
182
171
stringify!( $fmt, $( $arg) * ) ) ) } } ;
@@ -208,11 +197,7 @@ macro_rules! panic {
208
197
// `panic!("Error: {}", code);`
209
198
( $( $arg: tt) +) => { {
210
199
if false {
211
- #[ cfg( not( feature = "std" ) ) ]
212
200
__kani__workaround_core_assert!( true , $( $arg) +) ;
213
- // See comment in `assert` definition
214
- #[ cfg( feature = "std" ) ]
215
- core:: assert!( true , $( $arg) +) ;
216
201
}
217
202
kani:: panic( stringify!( $( $arg) +) ) ;
218
203
} } ;
0 commit comments