authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-01-20 00:32:02-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-01-20 13:27:52-05:00
log664e1a892c3b3a1162fa5b8eaa3762ad581b1d1b
tree142b71fa1bea932496128ed9e44cfadb1e3ef109
parent0e682e71b009ae3f627aae692037559e51db7b39

stage1: remove the "referenced here" error note

It's generally noise. The parts where it is useful will need to be redone to not be annoying for the general case.

4 files changed, 0 insertions(+), 64 deletions(-)

src/stage1/all_types.hpp-1
...@@ -1192,7 +1192,6 @@ struct AstNodeAnyFrameType {...@@ -1192,7 +1192,6 @@ struct AstNodeAnyFrameType {
1192struct AstNode {1192struct AstNode {
1193 enum NodeType type;1193 enum NodeType type;
1194 TokenIndex main_token;1194 TokenIndex main_token;
1195 bool already_traced_this_node;
1196 ZigType *owner;1195 ZigType *owner;
1197 union {1196 union {
1198 AstNodeFnDef fn_def;1197 AstNodeFnDef fn_def;
src/stage1/analyze.cpp-6
...@@ -73,7 +73,6 @@ ErrorMsg *add_token_error(CodeGen *g, ZigType *owner, TokenIndex token, Buf *msg...@@ -73,7 +73,6 @@ ErrorMsg *add_token_error(CodeGen *g, ZigType *owner, TokenIndex token, Buf *msg
73}73}
7474
75ErrorMsg *add_node_error(CodeGen *g, AstNode *node, Buf *msg) {75ErrorMsg *add_node_error(CodeGen *g, AstNode *node, Buf *msg) {
76 node->already_traced_this_node = true;
77 return add_token_error(g, node->owner, node->main_token, msg);76 return add_token_error(g, node->owner, node->main_token, msg);
78}77}
7978
...@@ -4473,11 +4472,6 @@ void resolve_top_level_decl(CodeGen *g, Tld *tld, AstNode *source_node, bool all...@@ -4473,11 +4472,6 @@ void resolve_top_level_decl(CodeGen *g, Tld *tld, AstNode *source_node, bool all
4473 break;4472 break;
4474 }4473 }
4475 }4474 }
4476
4477 if (g->trace_err != nullptr && source_node != nullptr && !source_node->already_traced_this_node) {
4478 g->trace_err = add_error_note(g, g->trace_err, source_node, buf_create_from_str("referenced here"));
4479 source_node->already_traced_this_node = true;
4480 }
4481}4475}
44824476
4483void resolve_container_usingnamespace_decls(CodeGen *g, ScopeDecls *decls_scope) {4477void resolve_container_usingnamespace_decls(CodeGen *g, ScopeDecls *decls_scope) {
src/stage1/ir.cpp-19
...@@ -25274,13 +25274,6 @@ ZigType *ir_analyze(CodeGen *codegen, Stage1Zir *stage1_zir, Stage1Air *stage1_a...@@ -25274,13 +25274,6 @@ ZigType *ir_analyze(CodeGen *codegen, Stage1Zir *stage1_zir, Stage1Air *stage1_a
25274 } else {25274 } else {
25275 stage1_air->first_err_trace_msg = ira->codegen->trace_err;25275 stage1_air->first_err_trace_msg = ira->codegen->trace_err;
25276 }25276 }
25277 if (stage1_air->first_err_trace_msg != nullptr &&
25278 !old_instruction->source_node->already_traced_this_node)
25279 {
25280 old_instruction->source_node->already_traced_this_node = true;
25281 stage1_air->first_err_trace_msg = add_error_note(ira->codegen, stage1_air->first_err_trace_msg,
25282 old_instruction->source_node, buf_create_from_str("referenced here"));
25283 }
25284 return ira->codegen->builtin_types.entry_invalid;25277 return ira->codegen->builtin_types.entry_invalid;
25285 } else if (ira->codegen->verbose_ir) {25278 } else if (ira->codegen->verbose_ir) {
25286 fprintf(stderr, "-> ");25279 fprintf(stderr, "-> ");
...@@ -25306,13 +25299,6 @@ ZigType *ir_analyze(CodeGen *codegen, Stage1Zir *stage1_zir, Stage1Air *stage1_a...@@ -25306,13 +25299,6 @@ ZigType *ir_analyze(CodeGen *codegen, Stage1Zir *stage1_zir, Stage1Air *stage1_a
25306 ZigType *res_type;25299 ZigType *res_type;
25307 if (stage1_air->first_err_trace_msg != nullptr) {25300 if (stage1_air->first_err_trace_msg != nullptr) {
25308 codegen->trace_err = stage1_air->first_err_trace_msg;25301 codegen->trace_err = stage1_air->first_err_trace_msg;
25309 if (codegen->trace_err != nullptr && stage1_air->source_node != nullptr &&
25310 !stage1_air->source_node->already_traced_this_node)
25311 {
25312 stage1_air->source_node->already_traced_this_node = true;
25313 codegen->trace_err = add_error_note(codegen, codegen->trace_err,
25314 stage1_air->source_node, buf_create_from_str("referenced here"));
25315 }
25316 res_type = ira->codegen->builtin_types.entry_invalid;25302 res_type = ira->codegen->builtin_types.entry_invalid;
25317 } else if (ira->src_implicit_return_type_list.length == 0) {25303 } else if (ira->src_implicit_return_type_list.length == 0) {
25318 res_type = codegen->builtin_types.entry_unreachable;25304 res_type = codegen->builtin_types.entry_unreachable;
...@@ -26277,11 +26263,6 @@ static Error ir_resolve_lazy_recurse(AstNode *source_node, ZigValue *val) {...@@ -26277,11 +26263,6 @@ static Error ir_resolve_lazy_recurse(AstNode *source_node, ZigValue *val) {
26277Error ir_resolve_lazy(CodeGen *codegen, AstNode *source_node, ZigValue *val) {26263Error ir_resolve_lazy(CodeGen *codegen, AstNode *source_node, ZigValue *val) {
26278 Error err;26264 Error err;
26279 if ((err = ir_resolve_lazy_raw(source_node, val))) {26265 if ((err = ir_resolve_lazy_raw(source_node, val))) {
26280 if (codegen->trace_err != nullptr && source_node != nullptr && !source_node->already_traced_this_node) {
26281 source_node->already_traced_this_node = true;
26282 codegen->trace_err = add_error_note(codegen, codegen->trace_err, source_node,
26283 buf_create_from_str("referenced here"));
26284 }
26285 return err;26266 return err;
26286 }26267 }
26287 if (type_is_invalid(val->type)) {26268 if (type_is_invalid(val->type)) {
test/compile_errors.zig-38
...@@ -412,7 +412,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -412,7 +412,6 @@ pub fn addCases(ctx: *TestContext) !void {
412 \\}412 \\}
413 , &[_][]const u8{413 , &[_][]const u8{
414 "tmp.zig:15:23: error: enum field missing: 'arst'",414 "tmp.zig:15:23: error: enum field missing: 'arst'",
415 "tmp.zig:27:24: note: referenced here",
416 });415 });
417416
418 ctx.objErrStage1("field access of opaque type",417 ctx.objErrStage1("field access of opaque type",
...@@ -505,7 +504,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -505,7 +504,6 @@ pub fn addCases(ctx: *TestContext) !void {
505 \\}504 \\}
506 , &[_][]const u8{505 , &[_][]const u8{
507 "tmp.zig:2:25: error: opaque types have unknown size and therefore cannot be directly embedded in unions",506 "tmp.zig:2:25: error: opaque types have unknown size and therefore cannot be directly embedded in unions",
508 "tmp.zig:13:17: note: referenced here",
509 });507 });
510508
511 ctx.objErrStage1("slice sentinel mismatch",509 ctx.objErrStage1("slice sentinel mismatch",
...@@ -541,7 +539,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -541,7 +539,6 @@ pub fn addCases(ctx: *TestContext) !void {
541 \\}539 \\}
542 , &[_][]const u8{540 , &[_][]const u8{
543 "tmp.zig:2:25: error: unions must have 1 or more fields",541 "tmp.zig:2:25: error: unions must have 1 or more fields",
544 "tmp.zig:11:17: note: referenced here",
545 });542 });
546543
547 ctx.objErrStage1("@Type for exhaustive enum with zero fields",544 ctx.objErrStage1("@Type for exhaustive enum with zero fields",
...@@ -560,7 +557,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -560,7 +557,6 @@ pub fn addCases(ctx: *TestContext) !void {
560 \\}557 \\}
561 , &[_][]const u8{558 , &[_][]const u8{
562 "tmp.zig:2:20: error: enums must have 1 or more fields",559 "tmp.zig:2:20: error: enums must have 1 or more fields",
563 "tmp.zig:12:9: note: referenced here",
564 });560 });
565561
566 ctx.objErrStage1("@Type for tagged union with extra union field",562 ctx.objErrStage1("@Type for tagged union with extra union field",
...@@ -596,7 +592,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -596,7 +592,6 @@ pub fn addCases(ctx: *TestContext) !void {
596 , &[_][]const u8{592 , &[_][]const u8{
597 "tmp.zig:14:23: error: enum field not found: 'arst'",593 "tmp.zig:14:23: error: enum field not found: 'arst'",
598 "tmp.zig:2:20: note: enum declared here",594 "tmp.zig:2:20: note: enum declared here",
599 "tmp.zig:27:24: note: referenced here",
600 });595 });
601596
602 ctx.objErrStage1("@Type with undefined",597 ctx.objErrStage1("@Type with undefined",
...@@ -812,9 +807,7 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -812,9 +807,7 @@ pub fn addCases(ctx: *TestContext) !void {
812 \\}807 \\}
813 , &[_][]const u8{808 , &[_][]const u8{
814 "tmp.zig:3:35: error: unable to evaluate constant expression",809 "tmp.zig:3:35: error: unable to evaluate constant expression",
815 "tmp.zig:3:9: note: referenced here",
816 "tmp.zig:7:37: error: unable to evaluate constant expression",810 "tmp.zig:7:37: error: unable to evaluate constant expression",
817 "tmp.zig:7:9: note: referenced here",
818 });811 });
819812
820 ctx.objErrStage1("extern variable has no type",813 ctx.objErrStage1("extern variable has no type",
...@@ -911,13 +904,9 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -911,13 +904,9 @@ pub fn addCases(ctx: *TestContext) !void {
911 \\}904 \\}
912 , &[_][]const u8{905 , &[_][]const u8{
913 "tmp.zig:3:32: error: unable to evaluate constant expression",906 "tmp.zig:3:32: error: unable to evaluate constant expression",
914 "tmp.zig:3:9: note: referenced here",
915 "tmp.zig:7:21: error: expected float type, found 'u32'",907 "tmp.zig:7:21: error: expected float type, found 'u32'",
916 "tmp.zig:7:9: note: referenced here",
917 "tmp.zig:11:26: error: expected float type, found 'u32'",908 "tmp.zig:11:26: error: expected float type, found 'u32'",
918 "tmp.zig:11:9: note: referenced here",
919 "tmp.zig:15:23: error: expected integer type, found 'f32'",909 "tmp.zig:15:23: error: expected integer type, found 'f32'",
920 "tmp.zig:15:9: note: referenced here",
921 });910 });
922911
923 ctx.testErrStage1("invalid float casts",912 ctx.testErrStage1("invalid float casts",
...@@ -939,13 +928,9 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -939,13 +928,9 @@ pub fn addCases(ctx: *TestContext) !void {
939 \\}928 \\}
940 , &[_][]const u8{929 , &[_][]const u8{
941 "tmp.zig:3:36: error: unable to evaluate constant expression",930 "tmp.zig:3:36: error: unable to evaluate constant expression",
942 "tmp.zig:3:9: note: referenced here",
943 "tmp.zig:7:21: error: expected integer type, found 'f32'",931 "tmp.zig:7:21: error: expected integer type, found 'f32'",
944 "tmp.zig:7:9: note: referenced here",
945 "tmp.zig:11:26: error: expected int type, found 'f32'",932 "tmp.zig:11:26: error: expected int type, found 'f32'",
946 "tmp.zig:11:9: note: referenced here",
947 "tmp.zig:15:25: error: expected float type, found 'u32'",933 "tmp.zig:15:25: error: expected float type, found 'u32'",
948 "tmp.zig:15:9: note: referenced here",
949 });934 });
950935
951 ctx.testErrStage1("invalid assignments",936 ctx.testErrStage1("invalid assignments",
...@@ -1218,7 +1203,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -1218,7 +1203,6 @@ pub fn addCases(ctx: *TestContext) !void {
1218 \\export const foo = @typeInfo(@This()).Struct.decls;1203 \\export const foo = @typeInfo(@This()).Struct.decls;
1219 , &[_][]const u8{1204 , &[_][]const u8{
1220 "tmp.zig:1:20: error: dependency loop detected",1205 "tmp.zig:1:20: error: dependency loop detected",
1221 "tmp.zig:1:45: note: referenced here",
1222 });1206 });
12231207
1224 ctx.objErrStage1("function call assigned to incorrect type",1208 ctx.objErrStage1("function call assigned to incorrect type",
...@@ -2154,7 +2138,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -2154,7 +2138,6 @@ pub fn addCases(ctx: *TestContext) !void {
2154 \\}2138 \\}
2155 , &[_][]const u8{2139 , &[_][]const u8{
2156 "tmp.zig:2:21: error: shift amount has to be an integer type, but found '*const u8'",2140 "tmp.zig:2:21: error: shift amount has to be an integer type, but found '*const u8'",
2157 "tmp.zig:2:17: note: referenced here",
2158 });2141 });
21592142
2160 ctx.objErrStage1("bit shifting only works on integer types",2143 ctx.objErrStage1("bit shifting only works on integer types",
...@@ -2164,7 +2147,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -2164,7 +2147,6 @@ pub fn addCases(ctx: *TestContext) !void {
2164 \\}2147 \\}
2165 , &[_][]const u8{2148 , &[_][]const u8{
2166 "tmp.zig:2:16: error: bit shifting operation expected integer type, found '*const u8'",2149 "tmp.zig:2:16: error: bit shifting operation expected integer type, found '*const u8'",
2167 "tmp.zig:2:27: note: referenced here",
2168 });2150 });
21692151
2170 ctx.objErrStage1("struct depends on itself via optional field",2152 ctx.objErrStage1("struct depends on itself via optional field",
...@@ -2461,7 +2443,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -2461,7 +2443,6 @@ pub fn addCases(ctx: *TestContext) !void {
2461 , &[_][]const u8{2443 , &[_][]const u8{
2462 "tmp.zig:4:1: error: unable to determine async function frame of 'amain'",2444 "tmp.zig:4:1: error: unable to determine async function frame of 'amain'",
2463 "tmp.zig:5:10: note: analysis of function 'other' depends on the frame",2445 "tmp.zig:5:10: note: analysis of function 'other' depends on the frame",
2464 "tmp.zig:8:13: note: referenced here",
2465 });2446 });
24662447
2467 ctx.objErrStage1("async function depends on its own frame",2448 ctx.objErrStage1("async function depends on its own frame",
...@@ -2474,7 +2455,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -2474,7 +2455,6 @@ pub fn addCases(ctx: *TestContext) !void {
2474 \\}2455 \\}
2475 , &[_][]const u8{2456 , &[_][]const u8{
2476 "tmp.zig:4:1: error: cannot resolve '@Frame(amain)': function not fully analyzed yet",2457 "tmp.zig:4:1: error: cannot resolve '@Frame(amain)': function not fully analyzed yet",
2477 "tmp.zig:5:13: note: referenced here",
2478 });2458 });
24792459
2480 ctx.objErrStage1("non async function pointer passed to @asyncCall",2460 ctx.objErrStage1("non async function pointer passed to @asyncCall",
...@@ -2697,7 +2677,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -2697,7 +2677,6 @@ pub fn addCases(ctx: *TestContext) !void {
2697 \\}2677 \\}
2698 , &[_][]const u8{2678 , &[_][]const u8{
2699 "tmp.zig:1:29: error: evaluation exceeded 1000 backwards branches",2679 "tmp.zig:1:29: error: evaluation exceeded 1000 backwards branches",
2700 "tmp.zig:5:18: note: referenced here",
2701 });2680 });
27022681
2703 ctx.objErrStage1("@ptrToInt 0 to non optional pointer",2682 ctx.objErrStage1("@ptrToInt 0 to non optional pointer",
...@@ -2874,7 +2853,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -2874,7 +2853,6 @@ pub fn addCases(ctx: *TestContext) !void {
2874 \\}2853 \\}
2875 , &[_][]const u8{2854 , &[_][]const u8{
2876 "tmp.zig:1:13: error: struct 'Foo' depends on itself",2855 "tmp.zig:1:13: error: struct 'Foo' depends on itself",
2877 "tmp.zig:8:28: note: referenced here",
2878 });2856 });
28792857
2880 ctx.objErrStage1("enum field value references enum",2858 ctx.objErrStage1("enum field value references enum",
...@@ -2900,8 +2878,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -2900,8 +2878,6 @@ pub fn addCases(ctx: *TestContext) !void {
2900 \\}2878 \\}
2901 , &[_][]const u8{2879 , &[_][]const u8{
2902 "tmp.zig:2:19: error: dependency loop detected",2880 "tmp.zig:2:19: error: dependency loop detected",
2903 "tmp.zig:1:19: note: referenced here",
2904 "tmp.zig:4:15: note: referenced here",
2905 });2881 });
29062882
2907 ctx.testErrStage1("not an enum type",2883 ctx.testErrStage1("not an enum type",
...@@ -5835,7 +5811,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -5835,7 +5811,6 @@ pub fn addCases(ctx: *TestContext) !void {
5835 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }5811 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }
5836 , &[_][]const u8{5812 , &[_][]const u8{
5837 "tmp.zig:3:14: error: division by zero",5813 "tmp.zig:3:14: error: division by zero",
5838 "tmp.zig:1:14: note: referenced here",
5839 });5814 });
58405815
5841 ctx.objErrStage1("branch on undefined value",5816 ctx.objErrStage1("branch on undefined value",
...@@ -6216,8 +6191,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6216,8 +6191,6 @@ pub fn addCases(ctx: *TestContext) !void {
6216 \\export fn entry() usize { return @sizeOf(@TypeOf(seventh_fib_number)); }6191 \\export fn entry() usize { return @sizeOf(@TypeOf(seventh_fib_number)); }
6217 , &[_][]const u8{6192 , &[_][]const u8{
6218 "tmp.zig:3:21: error: evaluation exceeded 1000 backwards branches",6193 "tmp.zig:3:21: error: evaluation exceeded 1000 backwards branches",
6219 "tmp.zig:1:37: note: referenced here",
6220 "tmp.zig:6:50: note: referenced here",
6221 });6194 });
62226195
6223 ctx.objErrStage1("@embedFile with bogus file",6196 ctx.objErrStage1("@embedFile with bogus file",
...@@ -6254,7 +6227,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6254,7 +6227,6 @@ pub fn addCases(ctx: *TestContext) !void {
6254 \\export fn entry() usize { return @sizeOf(@TypeOf(a)); }6227 \\export fn entry() usize { return @sizeOf(@TypeOf(a)); }
6255 , &[_][]const u8{6228 , &[_][]const u8{
6256 "tmp.zig:6:26: error: unable to evaluate constant expression",6229 "tmp.zig:6:26: error: unable to evaluate constant expression",
6257 "tmp.zig:4:17: note: referenced here",
6258 });6230 });
62596231
6260 ctx.objErrStage1("undeclared identifier error should mark fn as impure",6232 ctx.objErrStage1("undeclared identifier error should mark fn as impure",
...@@ -6332,7 +6304,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6332,7 +6304,6 @@ pub fn addCases(ctx: *TestContext) !void {
6332 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }6304 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }
6333 , &[_][]const u8{6305 , &[_][]const u8{
6334 "tmp.zig:3:12: error: negation caused overflow",6306 "tmp.zig:3:12: error: negation caused overflow",
6335 "tmp.zig:1:14: note: referenced here",
6336 });6307 });
63376308
6338 ctx.objErrStage1("add overflow in function evaluation",6309 ctx.objErrStage1("add overflow in function evaluation",
...@@ -6344,7 +6315,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6344,7 +6315,6 @@ pub fn addCases(ctx: *TestContext) !void {
6344 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }6315 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }
6345 , &[_][]const u8{6316 , &[_][]const u8{
6346 "tmp.zig:3:14: error: operation caused overflow",6317 "tmp.zig:3:14: error: operation caused overflow",
6347 "tmp.zig:1:14: note: referenced here",
6348 });6318 });
63496319
6350 ctx.objErrStage1("sub overflow in function evaluation",6320 ctx.objErrStage1("sub overflow in function evaluation",
...@@ -6356,7 +6326,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6356,7 +6326,6 @@ pub fn addCases(ctx: *TestContext) !void {
6356 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }6326 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }
6357 , &[_][]const u8{6327 , &[_][]const u8{
6358 "tmp.zig:3:14: error: operation caused overflow",6328 "tmp.zig:3:14: error: operation caused overflow",
6359 "tmp.zig:1:14: note: referenced here",
6360 });6329 });
63616330
6362 ctx.objErrStage1("mul overflow in function evaluation",6331 ctx.objErrStage1("mul overflow in function evaluation",
...@@ -6368,7 +6337,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6368,7 +6337,6 @@ pub fn addCases(ctx: *TestContext) !void {
6368 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }6337 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }
6369 , &[_][]const u8{6338 , &[_][]const u8{
6370 "tmp.zig:3:14: error: operation caused overflow",6339 "tmp.zig:3:14: error: operation caused overflow",
6371 "tmp.zig:1:14: note: referenced here",
6372 });6340 });
63736341
6374 ctx.objErrStage1("truncate sign mismatch",6342 ctx.objErrStage1("truncate sign mismatch",
...@@ -6455,7 +6423,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6455,7 +6423,6 @@ pub fn addCases(ctx: *TestContext) !void {
6455 \\}6423 \\}
6456 , &[_][]const u8{6424 , &[_][]const u8{
6457 "tmp.zig:3:7: error: unable to evaluate constant expression",6425 "tmp.zig:3:7: error: unable to evaluate constant expression",
6458 "tmp.zig:16:19: note: referenced here",
6459 });6426 });
64606427
6461 ctx.objErrStage1("bogus method call on slice",6428 ctx.objErrStage1("bogus method call on slice",
...@@ -6779,7 +6746,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6779,7 +6746,6 @@ pub fn addCases(ctx: *TestContext) !void {
6779 \\}6746 \\}
6780 , &[_][]const u8{6747 , &[_][]const u8{
6781 "tmp.zig:10:14: error: reached unreachable code",6748 "tmp.zig:10:14: error: reached unreachable code",
6782 "tmp.zig:6:20: note: referenced here",
6783 });6749 });
67846750
6785 ctx.objErrStage1("control flow uses comptime var at runtime",6751 ctx.objErrStage1("control flow uses comptime var at runtime",
...@@ -7280,8 +7246,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -7280,8 +7246,6 @@ pub fn addCases(ctx: *TestContext) !void {
7280 \\}7246 \\}
7281 , &[_][]const u8{7247 , &[_][]const u8{
7282 "tmp.zig:1:13: error: aoeu",7248 "tmp.zig:1:13: error: aoeu",
7283 "tmp.zig:3:19: note: referenced here",
7284 "tmp.zig:7:12: note: referenced here",
7285 });7249 });
72867250
7287 ctx.objErrStage1("float literal too large error",7251 ctx.objErrStage1("float literal too large error",
...@@ -8205,7 +8169,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -8205,7 +8169,6 @@ pub fn addCases(ctx: *TestContext) !void {
8205 \\}8169 \\}
8206 , &[_][]const u8{8170 , &[_][]const u8{
8207 "tmp.zig:3:53: error: vector element type must be integer, float, bool, or pointer; '@Vector(4, u8)' is invalid",8171 "tmp.zig:3:53: error: vector element type must be integer, float, bool, or pointer; '@Vector(4, u8)' is invalid",
8208 "tmp.zig:3:16: note: referenced here",
8209 });8172 });
82108173
8211 ctx.testErrStage1("bad @splat type",8174 ctx.testErrStage1("bad @splat type",
...@@ -8403,7 +8366,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -8403,7 +8366,6 @@ pub fn addCases(ctx: *TestContext) !void {
8403 , &[_][]const u8{8366 , &[_][]const u8{
8404 "tmp.zig:3:42: error: unable to @bitCast from pointer type '*[2]u8'",8367 "tmp.zig:3:42: error: unable to @bitCast from pointer type '*[2]u8'",
8405 "tmp.zig:8:32: error: destination type 'u16' has size 2 but source type '[]const u8' has size 16",8368 "tmp.zig:8:32: error: destination type 'u16' has size 2 but source type '[]const u8' has size 16",
8406 "tmp.zig:8:37: note: referenced here",
8407 });8369 });
84088370
8409 // issue #78108371 // issue #7810