Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Jun 11, 2024
1 parent fb35ce0 commit bf7a41e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions kani-compiler/src/codegen_cprover_gotoc/codegen/operand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ impl<'tcx> GotocCtx<'tcx> {
span: Option<SpanInternal>,
) -> Expr {
let stable_const = rustc_internal::stable(constant);
let stable_span = rustc_internal::stable(span);
self.codegen_const_ty(&stable_const, self.codegen_span_stable(stable_span.unwrap()))
if let Some(stable_span) = rustc_internal::stable(span) {
self.codegen_const_ty(&stable_const, self.codegen_span_stable(stable_span))
} else {
self.codegen_const_ty(&stable_const, Location::none())
}
}

/// Generate a goto expression that represents a MIR-level constant.
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/missing-function/extern_c/expected
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Status: UNDETERMINED\
Status: UNREACHABLE\
Description: "assertion failed: x == 5"
Status: FAILURE\
Description: "Function `missing_function` with missing definition is unreachable"
Expand Down

0 comments on commit bf7a41e

Please sign in to comment.