You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix a bug codegening SwitchInts with only an otherwise branch (#4095)
The first commit adds a failing test: it exposes a bug dealing with
dropping single-variant enums.
```
thread 'rustc' panicked at kani-compiler/src/codegen_cprover_gotoc/codegen/statement.rs:499:9:
assertion failed: targets.len() > 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Kani unexpectedly panicked during compilation.
Please file an issue here: https://github.com/model-checking/kani/issues/new?labels=bug&template=bug_report.md
[Kani] current codegen item: codegen_function: std::ptr::drop_in_place::<Reference>
_RINvNtCs4AkhfejoRTd_4core3ptr13drop_in_placeNtCs6S0fALEP9ee_19single_variant_enum9ReferenceEBI_
[Kani] current codegen location: Loc { file: "/Users/bkirwi/.rustup/toolchains/nightly-2025-05-20-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ptr/mod.rs", function: None, start_line: 524, start_col: Some(1), end_line: 524, end_col: Some(56), pragmas: [] }
error: /Users/bkirwi/Code/kani/target/kani/bin/kani-compiler exited with status exit status: 101
```
This seems to affect both `main` and the latest release.
Resolves#4103
---------
Co-authored-by: Carolyn Zech <[email protected]>
0 commit comments