# std: fix uses of comptime blocks in non-inline functions · gitcafe/zig

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

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

Visibility: public

Requested revision: 77fdd76c16196441dce0f38ccea2eae01436c4be

Requested commit: 77fdd76c16196441dce0f38ccea2eae01436c4be

Commit: 77fdd76c16196441dce0f38ccea2eae01436c4be

Tree: 3300be415c21a5b5903d2cf6e5893abb2a19f5b9

Author: mlugg

Committer: Andrew Kelley

## Message

```
std: fix uses of comptime blocks in non-inline functions

ccf670c made using `return` from within a comptime block in a non-inline
function illegal, since it is a use of runtime control flow in a
comptime block. It is allowed if the function in question is `inline`,
since no actual control flow occurs in this case. A few functions from
std (notably `std.fmt.comptimePrint`) needed to be marked `inline` to
support this change.

```

## Parents

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

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