Skip to content
ZOLO / TE832 Type · error

postfix `?`/`?>` requires a statically fallible operand

Compiler diagnostic TE832: postfix `?`/`?>` requires a statically fallible operand.

Why this fires

Postfix ? and the fallible pipe ?> require a value that can fail: T?, Option<T>, or Result<T, E>. Applying either operator to a statically plain value has no failure path to propagate.

fn invalid() -> int {
    42? // error[TE832]: `int` is not fallible
}

Fix it

Remove the operator when the value is already plain:

fn valid() -> int { 42 }

If the operation can fail, give it an honest nilable, Option, or Result return type and make the enclosing function able to return the same failure.

See also

  • TE833 — the failure cannot inhabit the enclosing return type.
  • TE834 — a nil-only operator was used on a boxed wrapper.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en