# langref: improve the defer section · gitcafe/zig

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

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

Visibility: public

Requested revision: 09cc6b4b9e76434d734ed131ed48ca849bf8a6ba

Requested commit: 09cc6b4b9e76434d734ed131ed48ca849bf8a6ba

Commit: 09cc6b4b9e76434d734ed131ed48ca849bf8a6ba

Tree: 5e80875ea8f998b39120214e84d012df3ae1e9db

Author: Manlio Perillo

Committer: Andrew Kelley

## Message

```
langref: improve the defer section

Split the original `defer.zig` doctest into 3 doctest:

  1. Document the defer keyword
  2. Document that the return statement is not allowed inside a defer
     expression
  3. Document the errdefer keyword

Replace "method" with "expression" in the text `defer method`.

```

## Parents

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

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