diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-04-22 18:07:46 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-04-22 18:07:46 -0700 |
| commit | 507a8096d2f9624bafaf963c3e189a477ef6b7bf (patch) | |
| tree | c21e3d54e1389fe44ecc7d5f230e792e26ab322d /lib/std/meta.zig | |
| parent | 7c453b91b85bab6800d24feb57c4f35b8ce48d57 (diff) | |
| download | zig-507a8096d2f9624bafaf963c3e189a477ef6b7bf.tar.gz zig-507a8096d2f9624bafaf963c3e189a477ef6b7bf.zip | |
std: fix compile errors caught by stage2 AstGen
* `comptime const` is redundant
* don't use `extern enum`; specify a tag type.
`extern enum` is only when you need tags to alias. But aliasing tags
is a smell. I will be making a proposal shortly to remove `extern enum`
from the language.
* there is no such thing as `packed enum`.
* instead of `catch |_|`, omit the capture entirely.
* unused function definition with missing parameter name
* using `try` outside of a function or test
Diffstat (limited to 'lib/std/meta.zig')
| -rw-r--r-- | lib/std/meta.zig | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/std/meta.zig b/lib/std/meta.zig index ff2e6fb226..a67e04431a 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -335,9 +335,6 @@ test "std.meta.containerLayout" { const E1 = enum { A, }; - const E2 = packed enum { - A, - }; const E3 = extern enum { A, }; @@ -355,7 +352,6 @@ test "std.meta.containerLayout" { }; testing.expect(containerLayout(E1) == .Auto); - testing.expect(containerLayout(E2) == .Packed); testing.expect(containerLayout(E3) == .Extern); testing.expect(containerLayout(S1) == .Auto); testing.expect(containerLayout(S2) == .Packed); |
