#[kanitool::is_contract_generated]
attribute is not detected
#3921
Labels
[C] Internal
Tracks some internal work. I.e.: Users should not be affected.
Z-Contracts
Issue related to code contracts
During contract instrumentation, we annotate the closures we add during instrumentation with
#[kanitool::is_contract_generated]
. However, callingtcx.get_attrs_unchecked
on such a closure does not return this tool attribute. This means that if we have something like:and we filter like this:
where
KaniAttributes::is_kani_instrumentation
is defined as:we would expect that all contract instrumentation closures are registered as such, and thus we report the reason for skipping as
AutoHarnessSkipReason::KaniImpl
. Instead, we get:i.e., the closures have no attributes, but we fail to generate an
Instance
from them, so they get erroneously reported to the user as generic functions.The text was updated successfully, but these errors were encountered: