Skip to content

Commit

Permalink
expect() does not take format strings (#2865)
Browse files Browse the repository at this point in the history
This would just print 
````
Function `{func}` should've been declared before usage'
````
on panic, it just now occurred to me that `func` is supposed to be
content of a var 😄

Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
  • Loading branch information
matthiaskrgr and zhassan-aws authored Nov 8, 2023
1 parent b291e73 commit 0bde3ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kani-compiler/src/codegen_cprover_gotoc/codegen/operand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,8 @@ impl<'tcx> GotocCtx<'tcx> {
trace!(func=?instance, "codegen_func_symbol");
let func = self.symbol_name(instance);
self.symbol_table
.lookup(func)
.expect("Function `{func}` should've been declared before usage")
.lookup(&func)
.unwrap_or_else(|| panic!("Function `{func}` should've been declared before usage"))
};
(sym, funct)
}
Expand Down

0 comments on commit 0bde3ea

Please sign in to comment.