# stage2: basic inferred error set support · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c2e66d9bab396a69514ec7c3c41fb0404e542f21)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c2e66d9bab396a69514ec7c3c41fb0404e542f21

Requested commit: c2e66d9bab396a69514ec7c3c41fb0404e542f21

Commit: c2e66d9bab396a69514ec7c3c41fb0404e542f21

Tree: fbc8b06cd459cd5e4ad2b39384c9d5d73e25c8ee

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: basic inferred error set support

 * Inferred error sets are stored in the return Type of the function,
   owned by the Module.Fn. So it cleans up that memory in deinit().
 * Sema: update the inferred error set in zirRetErrValue
   - Update relevant code in wrapErrorUnion
 * C backend: improve some some instructions to take advantage of
   liveness analysis to avoid being emitted when unused.
 * C backend: when an error union has a payload type with no runtime
   bits, emit the error union as the same type as the error set.

```

## Parents

- [5c8bd443d92c6306f60857720103ae46ca7b8b3e](https://git.cafe/gitcafe/zig/commit/5c8bd443d92c6306f60857720103ae46ca7b8b3e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c2e66d9bab396a69514ec7c3c41fb0404e542f21?format=markdown)
