E0004: invalid use of !
Generated from rellum-diagnostics/src/db.rs.
Explanation
The ! character is part of effect identifiers such as print!, or the != operator. A standalone ! is not a unary operator in Rellum syntax.
Common causes
- writing !flag instead of the Rellum logical not form
- placing ! after punctuation instead of as part of an effect name
- starting an effect call without an identifier before !
Canonical fixes
- use
notfor logical negation
Before:
value = !flag
After:
value = not flag
- write a complete effect identifier
Before:
main! = !(value)
After:
main! = print!(value)
Code example
value = !flag