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
{{ message }}
Repository navigation
Box codegen does not walk the pattern type inside NonNull #4800
and, with that assertion relaxed, the underlying mismatch:
cprover_bindings/src/goto_program/expr.rs:1049:9:
Error in struct_expr; value type does not match field type.
[Field { name: "pointer", typ: StructTag("tag-_62165824...") }]
[Expr { value: AddressOf(... hook::FnDefSingleton ...),
typ: Pointer { StructTag(... hook::FnDefStruct) } }]
RAW_PTR_FROM_BOX walks Box -> Unique -> NonNull -> pointer, but NonNull's pointer field holds a pattern_type!(*const T is !null), which is codegenned as a struct of its own, so the chain stops one level above the raw pointer. codegen_ptr_in_wrappers already documents and rebuilds that chain for DynMetadata; the Box path was not updated to match. The trigger is boxing a function item rather than a closure, which is why tests/kani/DynTrait/boxed_closure.rs passes.
Surfaced by std::panicking::Hook::into_box in an autoharness --list --std ./library run over the standard library on nightly-2026-08-21, which it aborts.
Activity
Walk the pattern type inside NonNull when codegenning a Box (model-ch…