https://ziglang.org/learn/overview/#a-fresh-take-on-error-handling
It looks like the example code "12-errors-as-values.zig" is supposed to be showing that openFile() can return a runtime error, and that it's a compile-time error not to handle this. The zig build-exe output displayed underneath is an error message, but it's saying that cwd() isn't a real function in the std.fs struct (the documentation (https://ziglang.org/documentation/0.16.0/std/#src/std/fs.zig) seems to agree on this) and has nothing to do with runtime error-handling.
The next example seems to use Io.Dir.cwd().openFile() instead of std.fs.cwd().openFile().
It's possible I'm misunderstanding (I'm completely new to Zig and that's why I'm reading the overview), so sorry if I'm just confused about what this is trying to show!