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-02-02 21:22:57-07:00
logaf844d865f4340f61a6942675c3d1c5828a30534
treef4c73ae3e1a3bb7479b52a504348070e8e2316fc
parent252fb642d59e47a11c1f6644dc798f2b7d781696

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",
...@@ -5824,7 +5800,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -5824,7 +5800,6 @@ pub fn addCases(ctx: *TestContext) !void {
5824 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }5800 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }
5825 , &[_][]const u8{5801 , &[_][]const u8{
5826 "tmp.zig:3:14: error: division by zero",5802 "tmp.zig:3:14: error: division by zero",
5827 "tmp.zig:1:14: note: referenced here",
5828 });5803 });
58295804
5830 ctx.objErrStage1("branch on undefined value",5805 ctx.objErrStage1("branch on undefined value",
...@@ -6205,8 +6180,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6205,8 +6180,6 @@ pub fn addCases(ctx: *TestContext) !void {
6205 \\export fn entry() usize { return @sizeOf(@TypeOf(seventh_fib_number)); }6180 \\export fn entry() usize { return @sizeOf(@TypeOf(seventh_fib_number)); }
6206 , &[_][]const u8{6181 , &[_][]const u8{
6207 "tmp.zig:3:21: error: evaluation exceeded 1000 backwards branches",6182 "tmp.zig:3:21: error: evaluation exceeded 1000 backwards branches",
6208 "tmp.zig:1:37: note: referenced here",
6209 "tmp.zig:6:50: note: referenced here",
6210 });6183 });
62116184
6212 ctx.objErrStage1("@embedFile with bogus file",6185 ctx.objErrStage1("@embedFile with bogus file",
...@@ -6243,7 +6216,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6243,7 +6216,6 @@ pub fn addCases(ctx: *TestContext) !void {
6243 \\export fn entry() usize { return @sizeOf(@TypeOf(a)); }6216 \\export fn entry() usize { return @sizeOf(@TypeOf(a)); }
6244 , &[_][]const u8{6217 , &[_][]const u8{
6245 "tmp.zig:6:26: error: unable to evaluate constant expression",6218 "tmp.zig:6:26: error: unable to evaluate constant expression",
6246 "tmp.zig:4:17: note: referenced here",
6247 });6219 });
62486220
6249 ctx.objErrStage1("undeclared identifier error should mark fn as impure",6221 ctx.objErrStage1("undeclared identifier error should mark fn as impure",
...@@ -6321,7 +6293,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6321,7 +6293,6 @@ pub fn addCases(ctx: *TestContext) !void {
6321 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }6293 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }
6322 , &[_][]const u8{6294 , &[_][]const u8{
6323 "tmp.zig:3:12: error: negation caused overflow",6295 "tmp.zig:3:12: error: negation caused overflow",
6324 "tmp.zig:1:14: note: referenced here",
6325 });6296 });
63266297
6327 ctx.objErrStage1("add overflow in function evaluation",6298 ctx.objErrStage1("add overflow in function evaluation",
...@@ -6333,7 +6304,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6333,7 +6304,6 @@ pub fn addCases(ctx: *TestContext) !void {
6333 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }6304 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }
6334 , &[_][]const u8{6305 , &[_][]const u8{
6335 "tmp.zig:3:14: error: operation caused overflow",6306 "tmp.zig:3:14: error: operation caused overflow",
6336 "tmp.zig:1:14: note: referenced here",
6337 });6307 });
63386308
6339 ctx.objErrStage1("sub overflow in function evaluation",6309 ctx.objErrStage1("sub overflow in function evaluation",
...@@ -6345,7 +6315,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6345,7 +6315,6 @@ pub fn addCases(ctx: *TestContext) !void {
6345 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }6315 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }
6346 , &[_][]const u8{6316 , &[_][]const u8{
6347 "tmp.zig:3:14: error: operation caused overflow",6317 "tmp.zig:3:14: error: operation caused overflow",
6348 "tmp.zig:1:14: note: referenced here",
6349 });6318 });
63506319
6351 ctx.objErrStage1("mul overflow in function evaluation",6320 ctx.objErrStage1("mul overflow in function evaluation",
...@@ -6357,7 +6326,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6357,7 +6326,6 @@ pub fn addCases(ctx: *TestContext) !void {
6357 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }6326 \\export fn entry() usize { return @sizeOf(@TypeOf(y)); }
6358 , &[_][]const u8{6327 , &[_][]const u8{
6359 "tmp.zig:3:14: error: operation caused overflow",6328 "tmp.zig:3:14: error: operation caused overflow",
6360 "tmp.zig:1:14: note: referenced here",
6361 });6329 });
63626330
6363 ctx.objErrStage1("truncate sign mismatch",6331 ctx.objErrStage1("truncate sign mismatch",
...@@ -6444,7 +6412,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6444,7 +6412,6 @@ pub fn addCases(ctx: *TestContext) !void {
6444 \\}6412 \\}
6445 , &[_][]const u8{6413 , &[_][]const u8{
6446 "tmp.zig:3:7: error: unable to evaluate constant expression",6414 "tmp.zig:3:7: error: unable to evaluate constant expression",
6447 "tmp.zig:16:19: note: referenced here",
6448 });6415 });
64496416
6450 ctx.objErrStage1("bogus method call on slice",6417 ctx.objErrStage1("bogus method call on slice",
...@@ -6768,7 +6735,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -6768,7 +6735,6 @@ pub fn addCases(ctx: *TestContext) !void {
6768 \\}6735 \\}
6769 , &[_][]const u8{6736 , &[_][]const u8{
6770 "tmp.zig:10:14: error: reached unreachable code",6737 "tmp.zig:10:14: error: reached unreachable code",
6771 "tmp.zig:6:20: note: referenced here",
6772 });6738 });
67736739
6774 ctx.objErrStage1("control flow uses comptime var at runtime",6740 ctx.objErrStage1("control flow uses comptime var at runtime",
...@@ -7269,8 +7235,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -7269,8 +7235,6 @@ pub fn addCases(ctx: *TestContext) !void {
7269 \\}7235 \\}
7270 , &[_][]const u8{7236 , &[_][]const u8{
7271 "tmp.zig:1:13: error: aoeu",7237 "tmp.zig:1:13: error: aoeu",
7272 "tmp.zig:3:19: note: referenced here",
7273 "tmp.zig:7:12: note: referenced here",
7274 });7238 });
72757239
7276 ctx.objErrStage1("float literal too large error",7240 ctx.objErrStage1("float literal too large error",
...@@ -8194,7 +8158,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -8194,7 +8158,6 @@ pub fn addCases(ctx: *TestContext) !void {
8194 \\}8158 \\}
8195 , &[_][]const u8{8159 , &[_][]const u8{
8196 "tmp.zig:3:53: error: vector element type must be integer, float, bool, or pointer; '@Vector(4, u8)' is invalid",8160 "tmp.zig:3:53: error: vector element type must be integer, float, bool, or pointer; '@Vector(4, u8)' is invalid",
8197 "tmp.zig:3:16: note: referenced here",
8198 });8161 });
81998162
8200 ctx.testErrStage1("bad @splat type",8163 ctx.testErrStage1("bad @splat type",
...@@ -8392,7 +8355,6 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -8392,7 +8355,6 @@ pub fn addCases(ctx: *TestContext) !void {
8392 , &[_][]const u8{8355 , &[_][]const u8{
8393 "tmp.zig:3:42: error: unable to @bitCast from pointer type '*[2]u8'",8356 "tmp.zig:3:42: error: unable to @bitCast from pointer type '*[2]u8'",
8394 "tmp.zig:8:32: error: destination type 'u16' has size 2 but source type '[]const u8' has size 16",8357 "tmp.zig:8:32: error: destination type 'u16' has size 2 but source type '[]const u8' has size 16",
8395 "tmp.zig:8:37: note: referenced here",
8396 });8358 });
83978359
8398 // issue #78108360 // issue #7810