authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-05-16 13:27:52+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-05-16 13:29:55+01:00
log16481c8ef347f7fc5ffdc4636cf904b335a6dc09
tree3626c052ec23b8a8f5473a0db3ae6ce0e6447e2c
parent429672705090f073adedb885057a4603eaf66c95
signaturelock-open Commit is signed but in an unrecognized format.

cases: update to new "called from here" notes


24 files changed, 30 insertions(+), 60 deletions(-)

test/cases/compile_errors/add_overflow_in_function_evaluation.zig+1-3
...@@ -8,8 +8,6 @@ export fn entry() usize {...@@ -8,8 +8,6 @@ export fn entry() usize {
8}8}
99
10// error10// error
11// backend=stage2
12// target=native
13//11//
14// :3:14: error: overflow of integer type 'u16' with value '65540'12// :3:14: error: overflow of integer type 'u16' with value '65540'
15// :1:14: note: called from here13// :1:14: note: called at comptime here
test/cases/compile_errors/closure_get_depends_on_failed_decl.zig+1-3
...@@ -18,9 +18,7 @@ pub export fn entry() void {...@@ -18,9 +18,7 @@ pub export fn entry() void {
18}18}
1919
20// error20// error
21// backend=stage2
22// target=native
23//21//
24// :11:5: error: expected 0 argument(s), found 122// :11:5: error: expected 0 argument(s), found 1
25// :1:12: note: function declared here23// :1:12: note: function declared here
26// :17:19: note: called from here24// :17:19: note: called inline here
test/cases/compile_errors/compile_time_division_by_zero.zig+1-1
...@@ -10,4 +10,4 @@ export fn entry() usize {...@@ -10,4 +10,4 @@ export fn entry() usize {
10// error10// error
11//11//
12// :3:16: error: division by zero here causes illegal behavior12// :3:16: error: division by zero here causes illegal behavior
13// :1:14: note: called from here13// :1:14: note: called at comptime here
test/cases/compile_errors/comptime_try_non_error.zig+1-3
...@@ -11,8 +11,6 @@ pub fn bar() u8 {...@@ -11,8 +11,6 @@ pub fn bar() u8 {
11}11}
1212
13// error13// error
14// backend=stage2
15// target=native
16//14//
17// :6:12: error: expected error union type, found 'u8'15// :6:12: error: expected error union type, found 'u8'
18// :2:8: note: called from here16// :2:8: note: called at comptime here
test/cases/compile_errors/comptime_var_referenced_by_type.zig+1-1
...@@ -22,4 +22,4 @@ comptime {...@@ -22,4 +22,4 @@ comptime {
22//22//
23// :7:16: error: captured value contains reference to comptime var23// :7:16: error: captured value contains reference to comptime var
24// :16:30: note: 'wrapper.ptr' points to comptime var declared here24// :16:30: note: 'wrapper.ptr' points to comptime var declared here
25// :17:29: note: called from here25// :17:29: note: called at comptime here
test/cases/compile_errors/constant_inside_comptime_function_has_compile_error.zig+1-2
...@@ -15,9 +15,8 @@ export fn entry() void {...@@ -15,9 +15,8 @@ export fn entry() void {
15}15}
1616
17// error17// error
18// target=native
19//18//
20// :4:5: error: unreachable code19// :4:5: error: unreachable code
21// :4:25: note: control flow is diverted here20// :4:25: note: control flow is diverted here
22// :4:25: error: aoeu21// :4:25: error: aoeu
23// :1:36: note: called from here22// :1:36: note: called at comptime here
test/cases/compile_errors/error_in_comptime_call_in_container_level_initializer.zig+1-3
...@@ -15,8 +15,6 @@ pub export fn entry() void {...@@ -15,8 +15,6 @@ pub export fn entry() void {
15}15}
1616
17// error17// error
18// backend=stage2
19// target=native
20//18//
21// :9:48: error: caught unexpected error 'InvalidVersion'19// :9:48: error: caught unexpected error 'InvalidVersion'
22// :?:?: note: error returned here20// :?:?: note: error returned here
...@@ -24,4 +22,4 @@ pub export fn entry() void {...@@ -24,4 +22,4 @@ pub export fn entry() void {
24// :?:?: note: error returned here22// :?:?: note: error returned here
25// :?:?: note: error returned here23// :?:?: note: error returned here
26// :?:?: note: error returned here24// :?:?: note: error returned here
27// :12:37: note: called from here25// :12:37: note: called at comptime here
test/cases/compile_errors/generic_function_instantiation_inherits_parent_branch_quota.zig+2-2
...@@ -25,5 +25,5 @@ fn Type(comptime n: usize) type {...@@ -25,5 +25,5 @@ fn Type(comptime n: usize) type {
25//25//
26// :21:16: error: evaluation exceeded 1001 backwards branches26// :21:16: error: evaluation exceeded 1001 backwards branches
27// :21:16: note: use @setEvalBranchQuota() to raise the branch limit from 100127// :21:16: note: use @setEvalBranchQuota() to raise the branch limit from 1001
28// :16:34: note: called from here28// :16:34: note: called at comptime here
29// :8:15: note: called from here29// :8:15: note: generic function instantiated here
test/cases/compile_errors/generic_instantiation_failure_in_generic_function_return_type.zig+1-3
...@@ -36,8 +36,6 @@ pub fn is(comptime id: std.builtin.TypeId) TraitFn {...@@ -36,8 +36,6 @@ pub fn is(comptime id: std.builtin.TypeId) TraitFn {
36}36}
3737
38// error38// error
39// backend=stage2
40// target=native
41//39//
42// :8:48: error: expected type 'type', found 'bool'40// :8:48: error: expected type 'type', found 'bool'
43// :5:21: note: called from here41// :5:21: note: generic function instantiated here
test/cases/compile_errors/missing_main_fn_in_executable.zig+2-3
...@@ -1,9 +1,8 @@...@@ -1,9 +1,8 @@
1// error1// error
2// backend=stage2
3// target=x86_64-linux2// target=x86_64-linux
4// output_mode=Exe3// output_mode=Exe
5//4//
6// : error: root source file struct 'tmp' has no member named 'main'5// : error: root source file struct 'tmp' has no member named 'main'
7// : note: struct declared here6// : note: struct declared here
8// : note: called from here7// : note: called inline here
9// : note: called from here8// : note: called inline here
test/cases/compile_errors/missing_struct_field_in_fn_called_at_comptime.zig+1-3
...@@ -10,9 +10,7 @@ comptime {...@@ -10,9 +10,7 @@ comptime {
10}10}
1111
12// error12// error
13// backend=stage2
14// target=native
15//13//
16// :5:17: error: missing struct field: b14// :5:17: error: missing struct field: b
17// :1:11: note: struct declared here15// :1:11: note: struct declared here
18// :9:15: note: called from here16// :9:15: note: called at comptime here
test/cases/compile_errors/mul_overflow_in_function_evaluation.zig+1-3
...@@ -8,8 +8,6 @@ export fn entry() usize {...@@ -8,8 +8,6 @@ export fn entry() usize {
8}8}
99
10// error10// error
11// backend=stage2
12// target=native
13//11//
14// :3:14: error: overflow of integer type 'u16' with value '1800000'12// :3:14: error: overflow of integer type 'u16' with value '1800000'
15// :1:14: note: called from here13// :1:14: note: called at comptime here
test/cases/compile_errors/negation_overflow_in_function_evaluation.zig+1-3
...@@ -8,8 +8,6 @@ export fn entry() usize {...@@ -8,8 +8,6 @@ export fn entry() usize {
8}8}
99
10// error10// error
11// backend=stage2
12// target=native
13//11//
14// :3:12: error: overflow of integer type 'i8' with value '128'12// :3:12: error: overflow of integer type 'i8' with value '128'
15// :1:14: note: called from here13// :1:14: note: called at comptime here
test/cases/compile_errors/non-comptime-parameter-used-as-array-size.zig+1-1
...@@ -11,4 +11,4 @@ fn makeLlamas(count: usize) [count]u8 {}...@@ -11,4 +11,4 @@ fn makeLlamas(count: usize) [count]u8 {}
11//11//
12// :8:30: error: unable to resolve comptime value12// :8:30: error: unable to resolve comptime value
13// :8:30: note: array length must be comptime-known13// :8:30: note: array length must be comptime-known
14// :2:31: note: called from here14// :2:31: note: generic function instantiated here
test/cases/compile_errors/private_main_fn.zig+2-3
...@@ -1,11 +1,10 @@...@@ -1,11 +1,10 @@
1fn main() void {}1fn main() void {}
22
3// error3// error
4// backend=stage2
5// target=x86_64-linux4// target=x86_64-linux
6// output_mode=Exe5// output_mode=Exe
7//6//
8// : error: 'main' is not marked 'pub'7// : error: 'main' is not marked 'pub'
9// :1:1: note: declared here8// :1:1: note: declared here
10// : note: called from here9// : note: called inline here
11// : note: called from here10// : note: called inline here
test/cases/compile_errors/recursive_inline_fn.zig+4-4
...@@ -31,8 +31,8 @@ pub export fn entry2() void {...@@ -31,8 +31,8 @@ pub export fn entry2() void {
31// error31// error
32//32//
33// :5:27: error: inline call is recursive33// :5:27: error: inline call is recursive
34// :12:12: note: called from here34// :12:12: note: called inline here
35// :24:10: error: inline call is recursive35// :24:10: error: inline call is recursive
36// :20:10: note: called from here36// :20:10: note: called inline here
37// :16:11: note: called from here37// :16:11: note: called inline here
38// :28:10: note: called from here38// :28:10: note: called inline here
test/cases/compile_errors/referring_to_a_struct_that_is_invalid.zig+1-3
...@@ -11,8 +11,6 @@ fn assert(ok: bool) void {...@@ -11,8 +11,6 @@ fn assert(ok: bool) void {
11}11}
1212
13// error13// error
14// backend=stage2
15// target=native
16//14//
17// :10:14: error: reached unreachable code15// :10:14: error: reached unreachable code
18// :6:20: note: called from here16// :6:20: note: called at comptime here
test/cases/compile_errors/ret_coercion_error_in_generic_fn_called_from_non_fn_scope.zig+1-3
...@@ -6,9 +6,7 @@ comptime {...@@ -6,9 +6,7 @@ comptime {
6}6}
77
8// error8// error
9// backend=stage2
10// target=native
11//9//
12// :2:12: error: expected type 'fn () void', found 'type'10// :2:12: error: expected type 'fn () void', found 'type'
13// :1:10: note: function return type declared here11// :1:10: note: function return type declared here
14// :5:12: note: called from here12// :5:12: note: called at comptime here
test/cases/compile_errors/runtime_operation_in_comptime_scope.zig+1-1
...@@ -30,7 +30,7 @@ var rt: u32 = undefined;...@@ -30,7 +30,7 @@ var rt: u32 = undefined;
30// :10:12: note: call to function with comptime-only return type 'type' is evaluated at comptime30// :10:12: note: call to function with comptime-only return type 'type' is evaluated at comptime
31// :13:10: note: return type declared here31// :13:10: note: return type declared here
32// :10:12: note: types are not available at runtime32// :10:12: note: types are not available at runtime
33// :2:8: note: called from here33// :2:8: note: called inline here
34// :19:8: error: unable to evaluate comptime expression34// :19:8: error: unable to evaluate comptime expression
35// :19:5: note: operation is runtime due to this operand35// :19:5: note: operation is runtime due to this operand
36// :6:8: note: called at comptime from here36// :6:8: note: called at comptime from here
test/cases/compile_errors/sema_src_used_after_inline_call.zig+1-3
...@@ -18,9 +18,7 @@ export fn entry() void {...@@ -18,9 +18,7 @@ export fn entry() void {
18}18}
1919
20// error20// error
21// backend=stage2
22// target=native
23//21//
24// :13:30: error: expected type 'u32', found 'i32'22// :13:30: error: expected type 'u32', found 'i32'
25// :13:30: note: unsigned 32-bit int cannot represent all possible signed 32-bit values23// :13:30: note: unsigned 32-bit int cannot represent all possible signed 32-bit values
26// :17:33: note: called from here24// :17:33: note: called inline here
test/cases/compile_errors/stack_usage_in_naked_function.zig+1-2
...@@ -36,10 +36,9 @@ export fn d() callconv(.naked) noreturn {...@@ -36,10 +36,9 @@ export fn d() callconv(.naked) noreturn {
36}36}
3737
38// error38// error
39// backend=stage2
40//39//
41// :2:5: error: local variable in naked function40// :2:5: error: local variable in naked function
42// :10:5: error: local variable in naked function41// :10:5: error: local variable in naked function
43// :23:5: error: local variable in naked function42// :23:5: error: local variable in naked function
44// :30:13: error: local variable in naked function43// :30:13: error: local variable in naked function
45// :35:12: note: called from here44// :35:12: note: called inline here
test/cases/compile_errors/store_to_comptime_var_through_call.zig+1-1
...@@ -12,4 +12,4 @@ fn incr(x: *comptime_int) void {...@@ -12,4 +12,4 @@ fn incr(x: *comptime_int) void {
12//12//
13// :8:9: error: store to comptime variable depends on runtime condition13// :8:9: error: store to comptime variable depends on runtime condition
14// :3:9: note: runtime condition here14// :3:9: note: runtime condition here
15// :4:22: note: called from here15// :4:22: note: called at comptime here
test/cases/compile_errors/sub_overflow_in_function_evaluation.zig+1-3
...@@ -8,8 +8,6 @@ export fn entry() usize {...@@ -8,8 +8,6 @@ export fn entry() usize {
8}8}
99
10// error10// error
11// backend=stage2
12// target=native
13//11//
14// :3:14: error: overflow of integer type 'u16' with value '-10'12// :3:14: error: overflow of integer type 'u16' with value '-10'
15// :1:14: note: called from here13// :1:14: note: called at comptime here
test/cases/compile_errors/unreachable_executed_at_comptime.zig+1-3
...@@ -9,8 +9,6 @@ export fn entry() void {...@@ -9,8 +9,6 @@ export fn entry() void {
9}9}
1010
11// error11// error
12// backend=stage2
13// target=native
14//12//
15// :4:9: error: reached unreachable code13// :4:9: error: reached unreachable code
16// :8:21: note: called from here14// :8:21: note: called at comptime here