# better anonymous struct naming · gitcafe/zig

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

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

Visibility: public

Requested revision: 2a9329c9988430cfa11a8bb4b02da0dce8749028

Requested commit: 2a9329c9988430cfa11a8bb4b02da0dce8749028

Commit: 2a9329c9988430cfa11a8bb4b02da0dce8749028

Tree: 3d28b4c95037be90a5dbe735728b2b07184dbd96

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
better anonymous struct naming

this makes anonymous structs inherit the name of the function they are in
only when they are the return expression.

also document the behavior and provide examples.

closes #1243

```

## Parents

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

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