Error
error: unexpected token: !
| ---------- while parsing this struct
54 | contract_pre_patch_apply!(basis);
| ^ unexpected token after this
contract_pre_patch_apply!() expands to debug_assert!() which is a statement, not a struct field. The macro call needs to be moved from the struct body to a function/method where it can execute as a runtime check.
Five-Whys
- CI fails → compilation error in struct body
- Macro call in struct → macros expand to statements, not fields
- Likely copy-paste error placing contract assertion in wrong location
Error
contract_pre_patch_apply!()expands todebug_assert!()which is a statement, not a struct field. The macro call needs to be moved from the struct body to a function/method where it can execute as a runtime check.Five-Whys