update std lib to decls being disallowed between fields

This commit is contained in:
Vexu
2020-04-18 19:44:59 +03:00
parent fff00c3bbb
commit b6fe839248
10 changed files with 103 additions and 42 deletions

View File

@@ -1,3 +1,18 @@
test "zig fmt: decl between fields" {
try testError(
\\const S = struct {
\\ const foo = 2;
\\ const bar = 2;
\\ const baz = 2;
\\ a: usize,
\\ const foo1 = 2;
\\ const bar1 = 2;
\\ const baz1 = 2;
\\ b: usize,
\\};
);
}
test "zig fmt: errdefer with payload" {
try testCanonical(
\\pub fn main() anyerror!void {
@@ -2001,11 +2016,11 @@ test "zig fmt: struct declaration" {
\\ f1: u8,
\\ f3: u8,
\\
\\ f2: u8,
\\
\\ fn method(self: *Self) Self {
\\ return self.*;
\\ }
\\
\\ f2: u8,
\\};
\\
\\const Ps = packed struct {