diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-06-21 20:20:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-21 20:20:48 -0400 |
| commit | c6844072ce440f581787bf97909261084a9edc6c (patch) | |
| tree | b0cade24a1ee14777be05644c19d76d158c3ab29 /src/type.zig | |
| parent | 8a6de78e0787015153707361a58659834d4c39c2 (diff) | |
| parent | 7bebb24838a603a436b58e49ee85110af9e8e05f (diff) | |
| download | zig-c6844072ce440f581787bf97909261084a9edc6c.tar.gz zig-c6844072ce440f581787bf97909261084a9edc6c.zip | |
Merge pull request #9047 from g-w1/spider-astgen
stage2 astgen: catch unused vars
Diffstat (limited to 'src/type.zig')
| -rw-r--r-- | src/type.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/type.zig b/src/type.zig index 549b15f366..853a4b7914 100644 --- a/src/type.zig +++ b/src/type.zig @@ -600,9 +600,11 @@ pub const Type = extern union { pub const HashContext = struct { pub fn hash(self: @This(), t: Type) u64 { + _ = self; return t.hash(); } pub fn eql(self: @This(), a: Type, b: Type) bool { + _ = self; return a.eql(b); } }; @@ -777,6 +779,7 @@ pub const Type = extern union { options: std.fmt.FormatOptions, writer: anytype, ) @TypeOf(writer).Error!void { + _ = options; comptime assert(fmt.len == 0); var ty = start_type; while (true) { @@ -3013,7 +3016,7 @@ pub const Type = extern union { .base = .{ .tag = t }, .data = data, }; - return Type{ .ptr_otherwise = &ptr.base }; + return file_struct.Type{ .ptr_otherwise = &ptr.base }; } pub fn Data(comptime t: Tag) type { @@ -3163,7 +3166,6 @@ pub const CType = enum { longdouble, pub fn sizeInBits(self: CType, target: Target) u16 { - const arch = target.cpu.arch; switch (target.os.tag) { .freestanding, .other => switch (target.cpu.arch) { .msp430 => switch (self) { |
