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 {
88}
99
1010// error
11// backend=stage2
12// target=native
1311//
1412// :3:14: error: overflow of integer type 'u16' with value '65540'
15// :1:14: note: called from here
13// :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 {
1818}
1919
2020// error
21// backend=stage2
22// target=native
2321//
2422// :11:5: error: expected 0 argument(s), found 1
2523// :1:12: note: function declared here
26// :17:19: note: called from here
24// :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 {
1010// error
1111//
1212// :3:16: error: division by zero here causes illegal behavior
13// :1:14: note: called from here
13// :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 {
1111}
1212
1313// error
14// backend=stage2
15// target=native
1614//
1715// :6:12: error: expected error union type, found 'u8'
18// :2:8: note: called from here
16// :2:8: note: called at comptime here
test/cases/compile_errors/comptime_var_referenced_by_type.zig+1-1
......@@ -22,4 +22,4 @@ comptime {
2222//
2323// :7:16: error: captured value contains reference to comptime var
2424// :16:30: note: 'wrapper.ptr' points to comptime var declared here
25// :17:29: note: called from here
25// :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 {
1515}
1616
1717// error
18// target=native
1918//
2019// :4:5: error: unreachable code
2120// :4:25: note: control flow is diverted here
2221// :4:25: error: aoeu
23// :1:36: note: called from here
22// :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 {
1515}
1616
1717// error
18// backend=stage2
19// target=native
2018//
2119// :9:48: error: caught unexpected error 'InvalidVersion'
2220// :?:?: note: error returned here
......@@ -24,4 +22,4 @@ pub export fn entry() void {
2422// :?:?: note: error returned here
2523// :?:?: note: error returned here
2624// :?:?: note: error returned here
27// :12:37: note: called from here
25// :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 {
2525//
2626// :21:16: error: evaluation exceeded 1001 backwards branches
2727// :21:16: note: use @setEvalBranchQuota() to raise the branch limit from 1001
28// :16:34: note: called from here
29// :8:15: note: called from here
28// :16:34: note: called at comptime here
29// :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 {
3636}
3737
3838// error
39// backend=stage2
40// target=native
4139//
4240// :8:48: error: expected type 'type', found 'bool'
43// :5:21: note: called from here
41// :5:21: note: generic function instantiated here
test/cases/compile_errors/missing_main_fn_in_executable.zig+2-3
......@@ -1,9 +1,8 @@
11// error
2// backend=stage2
32// target=x86_64-linux
43// output_mode=Exe
54//
65// : error: root source file struct 'tmp' has no member named 'main'
76// : note: struct declared here
8// : note: called from here
9// : note: called from here
7// : note: called inline here
8// : note: called inline here
test/cases/compile_errors/missing_struct_field_in_fn_called_at_comptime.zig+1-3
......@@ -10,9 +10,7 @@ comptime {
1010}
1111
1212// error
13// backend=stage2
14// target=native
1513//
1614// :5:17: error: missing struct field: b
1715// :1:11: note: struct declared here
18// :9:15: note: called from here
16// :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 {
88}
99
1010// error
11// backend=stage2
12// target=native
1311//
1412// :3:14: error: overflow of integer type 'u16' with value '1800000'
15// :1:14: note: called from here
13// :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 {
88}
99
1010// error
11// backend=stage2
12// target=native
1311//
1412// :3:12: error: overflow of integer type 'i8' with value '128'
15// :1:14: note: called from here
13// :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 {}
1111//
1212// :8:30: error: unable to resolve comptime value
1313// :8:30: note: array length must be comptime-known
14// :2:31: note: called from here
14// :2:31: note: generic function instantiated here
test/cases/compile_errors/private_main_fn.zig+2-3
......@@ -1,11 +1,10 @@
11fn main() void {}
22
33// error
4// backend=stage2
54// target=x86_64-linux
65// output_mode=Exe
76//
87// : error: 'main' is not marked 'pub'
98// :1:1: note: declared here
10// : note: called from here
11// : note: called from here
9// : note: called inline here
10// : note: called inline here
test/cases/compile_errors/recursive_inline_fn.zig+4-4
......@@ -31,8 +31,8 @@ pub export fn entry2() void {
3131// error
3232//
3333// :5:27: error: inline call is recursive
34// :12:12: note: called from here
34// :12:12: note: called inline here
3535// :24:10: error: inline call is recursive
36// :20:10: note: called from here
37// :16:11: note: called from here
38// :28:10: note: called from here
36// :20:10: note: called inline here
37// :16:11: note: called inline here
38// :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 {
1111}
1212
1313// error
14// backend=stage2
15// target=native
1614//
1715// :10:14: error: reached unreachable code
18// :6:20: note: called from here
16// :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 {
66}
77
88// error
9// backend=stage2
10// target=native
119//
1210// :2:12: error: expected type 'fn () void', found 'type'
1311// :1:10: note: function return type declared here
14// :5:12: note: called from here
12// :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;
3030// :10:12: note: call to function with comptime-only return type 'type' is evaluated at comptime
3131// :13:10: note: return type declared here
3232// :10:12: note: types are not available at runtime
33// :2:8: note: called from here
33// :2:8: note: called inline here
3434// :19:8: error: unable to evaluate comptime expression
3535// :19:5: note: operation is runtime due to this operand
3636// :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 {
1818}
1919
2020// error
21// backend=stage2
22// target=native
2321//
2422// :13:30: error: expected type 'u32', found 'i32'
2523// :13:30: note: unsigned 32-bit int cannot represent all possible signed 32-bit values
26// :17:33: note: called from here
24// :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 {
3636}
3737
3838// error
39// backend=stage2
4039//
4140// :2:5: error: local variable in naked function
4241// :10:5: error: local variable in naked function
4342// :23:5: error: local variable in naked function
4443// :30:13: error: local variable in naked function
45// :35:12: note: called from here
44// :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 {
1212//
1313// :8:9: error: store to comptime variable depends on runtime condition
1414// :3:9: note: runtime condition here
15// :4:22: note: called from here
15// :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 {
88}
99
1010// error
11// backend=stage2
12// target=native
1311//
1412// :3:14: error: overflow of integer type 'u16' with value '-10'
15// :1:14: note: called from here
13// :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 {
99}
1010
1111// error
12// backend=stage2
13// target=native
1412//
1513// :4:9: error: reached unreachable code
16// :8:21: note: called from here
14// :8:21: note: called at comptime here