From 507a8096d2f9624bafaf963c3e189a477ef6b7bf Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 22 Apr 2021 18:07:46 -0700 Subject: 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 --- lib/std/elf.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/std/elf.zig') diff --git a/lib/std/elf.zig b/lib/std/elf.zig index 36382ecc42..c37cc74223 100644 --- a/lib/std/elf.zig +++ b/lib/std/elf.zig @@ -311,7 +311,7 @@ pub const VER_FLG_BASE = 0x1; pub const VER_FLG_WEAK = 0x2; /// File types -pub const ET = extern enum(u16) { +pub const ET = enum(u16) { /// No file type NONE = 0, @@ -991,7 +991,7 @@ pub const Half = switch (@sizeOf(usize)) { /// See current registered ELF machine architectures at: /// http://www.uxsglobal.com/developers/gabi/latest/ch4.eheader.html /// The underscore prefix is because many of these start with numbers. -pub const EM = extern enum(u16) { +pub const EM = enum(u16) { /// No machine _NONE = 0, -- cgit v1.2.3