zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 16481c8ef347f7fc5ffdc4636cf904b335a6dc09 (tree)
parent 429672705090f073adedb885057a4603eaf66c95
Author: mlugg <mlugg@mlugg.co.uk>
Date:   Fri, 16 May 2025 13:27:52 +0100

cases: update to new "called from here" notes

Diffstat:
Mtest/cases/compile_errors/add_overflow_in_function_evaluation.zig | 4+---
Mtest/cases/compile_errors/closure_get_depends_on_failed_decl.zig | 4+---
Mtest/cases/compile_errors/compile_time_division_by_zero.zig | 2+-
Mtest/cases/compile_errors/comptime_try_non_error.zig | 4+---
Mtest/cases/compile_errors/comptime_var_referenced_by_type.zig | 2+-
Mtest/cases/compile_errors/constant_inside_comptime_function_has_compile_error.zig | 3+--
Mtest/cases/compile_errors/error_in_comptime_call_in_container_level_initializer.zig | 4+---
Mtest/cases/compile_errors/generic_function_instantiation_inherits_parent_branch_quota.zig | 4++--
Mtest/cases/compile_errors/generic_instantiation_failure_in_generic_function_return_type.zig | 4+---
Mtest/cases/compile_errors/missing_main_fn_in_executable.zig | 5++---
Mtest/cases/compile_errors/missing_struct_field_in_fn_called_at_comptime.zig | 4+---
Mtest/cases/compile_errors/mul_overflow_in_function_evaluation.zig | 4+---
Mtest/cases/compile_errors/negation_overflow_in_function_evaluation.zig | 4+---
Mtest/cases/compile_errors/non-comptime-parameter-used-as-array-size.zig | 2+-
Mtest/cases/compile_errors/private_main_fn.zig | 5++---
Mtest/cases/compile_errors/recursive_inline_fn.zig | 8++++----
Mtest/cases/compile_errors/referring_to_a_struct_that_is_invalid.zig | 4+---
Mtest/cases/compile_errors/ret_coercion_error_in_generic_fn_called_from_non_fn_scope.zig | 4+---
Mtest/cases/compile_errors/runtime_operation_in_comptime_scope.zig | 2+-
Mtest/cases/compile_errors/sema_src_used_after_inline_call.zig | 4+---
Mtest/cases/compile_errors/stack_usage_in_naked_function.zig | 3+--
Mtest/cases/compile_errors/store_to_comptime_var_through_call.zig | 2+-
Mtest/cases/compile_errors/sub_overflow_in_function_evaluation.zig | 4+---
Mtest/cases/compile_errors/unreachable_executed_at_comptime.zig | 4+---
24 files changed, 30 insertions(+), 60 deletions(-)

diff --git a/test/cases/compile_errors/add_overflow_in_function_evaluation.zig b/test/cases/compile_errors/add_overflow_in_function_evaluation.zig @@ -8,8 +8,6 @@ export fn entry() usize { } // error -// backend=stage2 -// target=native // // :3:14: error: overflow of integer type 'u16' with value '65540' -// :1:14: note: called from here +// :1:14: note: called at comptime here diff --git a/test/cases/compile_errors/closure_get_depends_on_failed_decl.zig b/test/cases/compile_errors/closure_get_depends_on_failed_decl.zig @@ -18,9 +18,7 @@ pub export fn entry() void { } // error -// backend=stage2 -// target=native // // :11:5: error: expected 0 argument(s), found 1 // :1:12: note: function declared here -// :17:19: note: called from here +// :17:19: note: called inline here diff --git a/test/cases/compile_errors/compile_time_division_by_zero.zig b/test/cases/compile_errors/compile_time_division_by_zero.zig @@ -10,4 +10,4 @@ export fn entry() usize { // error // // :3:16: error: division by zero here causes illegal behavior -// :1:14: note: called from here +// :1:14: note: called at comptime here diff --git a/test/cases/compile_errors/comptime_try_non_error.zig b/test/cases/compile_errors/comptime_try_non_error.zig @@ -11,8 +11,6 @@ pub fn bar() u8 { } // error -// backend=stage2 -// target=native // // :6:12: error: expected error union type, found 'u8' -// :2:8: note: called from here +// :2:8: note: called at comptime here diff --git a/test/cases/compile_errors/comptime_var_referenced_by_type.zig b/test/cases/compile_errors/comptime_var_referenced_by_type.zig @@ -22,4 +22,4 @@ comptime { // // :7:16: error: captured value contains reference to comptime var // :16:30: note: 'wrapper.ptr' points to comptime var declared here -// :17:29: note: called from here +// :17:29: note: called at comptime here diff --git a/test/cases/compile_errors/constant_inside_comptime_function_has_compile_error.zig b/test/cases/compile_errors/constant_inside_comptime_function_has_compile_error.zig @@ -15,9 +15,8 @@ export fn entry() void { } // error -// target=native // // :4:5: error: unreachable code // :4:25: note: control flow is diverted here // :4:25: error: aoeu -// :1:36: note: called from here +// :1:36: note: called at comptime here diff --git a/test/cases/compile_errors/error_in_comptime_call_in_container_level_initializer.zig b/test/cases/compile_errors/error_in_comptime_call_in_container_level_initializer.zig @@ -15,8 +15,6 @@ pub export fn entry() void { } // error -// backend=stage2 -// target=native // // :9:48: error: caught unexpected error 'InvalidVersion' // :?:?: note: error returned here @@ -24,4 +22,4 @@ pub export fn entry() void { // :?:?: note: error returned here // :?:?: note: error returned here // :?:?: note: error returned here -// :12:37: note: called from here +// :12:37: note: called at comptime here diff --git a/test/cases/compile_errors/generic_function_instantiation_inherits_parent_branch_quota.zig b/test/cases/compile_errors/generic_function_instantiation_inherits_parent_branch_quota.zig @@ -25,5 +25,5 @@ fn Type(comptime n: usize) type { // // :21:16: error: evaluation exceeded 1001 backwards branches // :21:16: note: use @setEvalBranchQuota() to raise the branch limit from 1001 -// :16:34: note: called from here -// :8:15: note: called from here +// :16:34: note: called at comptime here +// :8:15: note: generic function instantiated here diff --git a/test/cases/compile_errors/generic_instantiation_failure_in_generic_function_return_type.zig b/test/cases/compile_errors/generic_instantiation_failure_in_generic_function_return_type.zig @@ -36,8 +36,6 @@ pub fn is(comptime id: std.builtin.TypeId) TraitFn { } // error -// backend=stage2 -// target=native // // :8:48: error: expected type 'type', found 'bool' -// :5:21: note: called from here +// :5:21: note: generic function instantiated here diff --git a/test/cases/compile_errors/missing_main_fn_in_executable.zig b/test/cases/compile_errors/missing_main_fn_in_executable.zig @@ -1,9 +1,8 @@ // error -// backend=stage2 // target=x86_64-linux // output_mode=Exe // // : error: root source file struct 'tmp' has no member named 'main' // : note: struct declared here -// : note: called from here -// : note: called from here +// : note: called inline here +// : note: called inline here diff --git a/test/cases/compile_errors/missing_struct_field_in_fn_called_at_comptime.zig b/test/cases/compile_errors/missing_struct_field_in_fn_called_at_comptime.zig @@ -10,9 +10,7 @@ comptime { } // error -// backend=stage2 -// target=native // // :5:17: error: missing struct field: b // :1:11: note: struct declared here -// :9:15: note: called from here +// :9:15: note: called at comptime here diff --git a/test/cases/compile_errors/mul_overflow_in_function_evaluation.zig b/test/cases/compile_errors/mul_overflow_in_function_evaluation.zig @@ -8,8 +8,6 @@ export fn entry() usize { } // error -// backend=stage2 -// target=native // // :3:14: error: overflow of integer type 'u16' with value '1800000' -// :1:14: note: called from here +// :1:14: note: called at comptime here diff --git a/test/cases/compile_errors/negation_overflow_in_function_evaluation.zig b/test/cases/compile_errors/negation_overflow_in_function_evaluation.zig @@ -8,8 +8,6 @@ export fn entry() usize { } // error -// backend=stage2 -// target=native // // :3:12: error: overflow of integer type 'i8' with value '128' -// :1:14: note: called from here +// :1:14: note: called at comptime here diff --git a/test/cases/compile_errors/non-comptime-parameter-used-as-array-size.zig b/test/cases/compile_errors/non-comptime-parameter-used-as-array-size.zig @@ -11,4 +11,4 @@ fn makeLlamas(count: usize) [count]u8 {} // // :8:30: error: unable to resolve comptime value // :8:30: note: array length must be comptime-known -// :2:31: note: called from here +// :2:31: note: generic function instantiated here diff --git a/test/cases/compile_errors/private_main_fn.zig b/test/cases/compile_errors/private_main_fn.zig @@ -1,11 +1,10 @@ fn main() void {} // error -// backend=stage2 // target=x86_64-linux // output_mode=Exe // // : error: 'main' is not marked 'pub' // :1:1: note: declared here -// : note: called from here -// : note: called from here +// : note: called inline here +// : note: called inline here diff --git a/test/cases/compile_errors/recursive_inline_fn.zig b/test/cases/compile_errors/recursive_inline_fn.zig @@ -31,8 +31,8 @@ pub export fn entry2() void { // error // // :5:27: error: inline call is recursive -// :12:12: note: called from here +// :12:12: note: called inline here // :24:10: error: inline call is recursive -// :20:10: note: called from here -// :16:11: note: called from here -// :28:10: note: called from here +// :20:10: note: called inline here +// :16:11: note: called inline here +// :28:10: note: called inline here diff --git a/test/cases/compile_errors/referring_to_a_struct_that_is_invalid.zig b/test/cases/compile_errors/referring_to_a_struct_that_is_invalid.zig @@ -11,8 +11,6 @@ fn assert(ok: bool) void { } // error -// backend=stage2 -// target=native // // :10:14: error: reached unreachable code -// :6:20: note: called from here +// :6:20: note: called at comptime here diff --git a/test/cases/compile_errors/ret_coercion_error_in_generic_fn_called_from_non_fn_scope.zig b/test/cases/compile_errors/ret_coercion_error_in_generic_fn_called_from_non_fn_scope.zig @@ -6,9 +6,7 @@ comptime { } // error -// backend=stage2 -// target=native // // :2:12: error: expected type 'fn () void', found 'type' // :1:10: note: function return type declared here -// :5:12: note: called from here +// :5:12: note: called at comptime here diff --git a/test/cases/compile_errors/runtime_operation_in_comptime_scope.zig b/test/cases/compile_errors/runtime_operation_in_comptime_scope.zig @@ -30,7 +30,7 @@ var rt: u32 = undefined; // :10:12: note: call to function with comptime-only return type 'type' is evaluated at comptime // :13:10: note: return type declared here // :10:12: note: types are not available at runtime -// :2:8: note: called from here +// :2:8: note: called inline here // :19:8: error: unable to evaluate comptime expression // :19:5: note: operation is runtime due to this operand // :6:8: note: called at comptime from here diff --git a/test/cases/compile_errors/sema_src_used_after_inline_call.zig b/test/cases/compile_errors/sema_src_used_after_inline_call.zig @@ -18,9 +18,7 @@ export fn entry() void { } // error -// backend=stage2 -// target=native // // :13:30: error: expected type 'u32', found 'i32' // :13:30: note: unsigned 32-bit int cannot represent all possible signed 32-bit values -// :17:33: note: called from here +// :17:33: note: called inline here diff --git a/test/cases/compile_errors/stack_usage_in_naked_function.zig b/test/cases/compile_errors/stack_usage_in_naked_function.zig @@ -36,10 +36,9 @@ export fn d() callconv(.naked) noreturn { } // error -// backend=stage2 // // :2:5: error: local variable in naked function // :10:5: error: local variable in naked function // :23:5: error: local variable in naked function // :30:13: error: local variable in naked function -// :35:12: note: called from here +// :35:12: note: called inline here diff --git a/test/cases/compile_errors/store_to_comptime_var_through_call.zig b/test/cases/compile_errors/store_to_comptime_var_through_call.zig @@ -12,4 +12,4 @@ fn incr(x: *comptime_int) void { // // :8:9: error: store to comptime variable depends on runtime condition // :3:9: note: runtime condition here -// :4:22: note: called from here +// :4:22: note: called at comptime here diff --git a/test/cases/compile_errors/sub_overflow_in_function_evaluation.zig b/test/cases/compile_errors/sub_overflow_in_function_evaluation.zig @@ -8,8 +8,6 @@ export fn entry() usize { } // error -// backend=stage2 -// target=native // // :3:14: error: overflow of integer type 'u16' with value '-10' -// :1:14: note: called from here +// :1:14: note: called at comptime here diff --git a/test/cases/compile_errors/unreachable_executed_at_comptime.zig b/test/cases/compile_errors/unreachable_executed_at_comptime.zig @@ -9,8 +9,6 @@ export fn entry() void { } // error -// backend=stage2 -// target=native // // :4:9: error: reached unreachable code -// :8:21: note: called from here +// :8:21: note: called at comptime here