E0038: Raise Requires Effectful
You used the raise keyword with a function call that is not effectful.
Example
fn pure_function() -> i64 {
42
}
fn main() {
let x = raise pure_function(); // Error: `raise` can only be used with effectful function calls
}
How to fix
Only use raise with effectful functions, or remove the raise keyword:
fn pure_function() -> i64 {
42
}
fn main() {
let x = pure_function(); // OK - no raise needed for pure functions
}