@@ -87,40 +87,6 @@ impl<'tcx> GotocHook<'tcx> for Cover {
87
87
}
88
88
}
89
89
90
- struct ExpectFail ;
91
- impl < ' tcx > GotocHook < ' tcx > for ExpectFail {
92
- fn hook_applies ( & self , tcx : TyCtxt < ' tcx > , instance : Instance < ' tcx > ) -> bool {
93
- matches_function ( tcx, instance, "KaniExpectFail" )
94
- }
95
-
96
- fn handle (
97
- & self ,
98
- tcx : & mut GotocCtx < ' tcx > ,
99
- _instance : Instance < ' tcx > ,
100
- mut fargs : Vec < Expr > ,
101
- _assign_to : Place < ' tcx > ,
102
- target : Option < BasicBlock > ,
103
- span : Option < Span > ,
104
- ) -> Stmt {
105
- assert_eq ! ( fargs. len( ) , 2 ) ;
106
- let target = target. unwrap ( ) ;
107
- let cond = fargs. remove ( 0 ) . cast_to ( Type :: bool ( ) ) ;
108
-
109
- // Add "EXPECTED FAIL" to the message because compiletest relies on it
110
- let msg =
111
- format ! ( "EXPECTED FAIL: {}" , tcx. extract_const_message( & fargs. remove( 0 ) ) . unwrap( ) ) ;
112
-
113
- let loc = tcx. codegen_span_option ( span) ;
114
- Stmt :: block (
115
- vec ! [
116
- tcx. codegen_assert( cond, PropertyClass :: ExpectFail , & msg, loc) ,
117
- Stmt :: goto( tcx. current_fn( ) . find_label( & target) , loc) ,
118
- ] ,
119
- loc,
120
- )
121
- }
122
- }
123
-
124
90
struct Assume ;
125
91
impl < ' tcx > GotocHook < ' tcx > for Assume {
126
92
fn hook_applies ( & self , tcx : TyCtxt < ' tcx > , instance : Instance < ' tcx > ) -> bool {
@@ -411,7 +377,6 @@ pub fn fn_hooks<'tcx>() -> GotocHooks<'tcx> {
411
377
Rc :: new( Assume ) ,
412
378
Rc :: new( Assert ) ,
413
379
Rc :: new( Cover ) ,
414
- Rc :: new( ExpectFail ) ,
415
380
Rc :: new( Nondet ) ,
416
381
Rc :: new( RustAlloc ) ,
417
382
Rc :: new( SliceFromRawPart ) ,
0 commit comments