# Handle unions differently in std.fmt \(\#1432\) · gitcafe/zig

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

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

Visibility: public

Requested revision: ecc54640243ba84ffa3656b73aa7dd6b53474462

Requested commit: ecc54640243ba84ffa3656b73aa7dd6b53474462

Commit: ecc54640243ba84ffa3656b73aa7dd6b53474462

Tree: 3a133b1343b4589a3871c704c727fca13d876c5f

Author: tgschultz

Committer: Andrew Kelley

## Message

```
Handle unions differently in std.fmt (#1432)

* Handle unions differently in std.fmt

Print the active tag's value in tagged unions. Untagged unions considered unsafe to print and treated like a pointer or an array.


```

## Parents

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

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