diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-09-28 15:58:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-28 15:58:41 -0700 |
| commit | 0cdec976e4eaf96e1735ff417b222ab1463727e8 (patch) | |
| tree | 1b47bb75eb6f29f9da11c93ac7ea924a8bfb326a /src/Zcu.zig | |
| parent | 085cc54aadb327b9910be2c72b31ea046e7e8f52 (diff) | |
| parent | 2857ca1edc1c3fa83298d2e8f6d505a3776f1ae3 (diff) | |
| download | zig-0cdec976e4eaf96e1735ff417b222ab1463727e8.tar.gz zig-0cdec976e4eaf96e1735ff417b222ab1463727e8.zip | |
Merge pull request #21520 from ziglang/no-formatted-panics
formalize the panic interface
closes #17969
closes #20240
Diffstat (limited to 'src/Zcu.zig')
| -rw-r--r-- | src/Zcu.zig | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/Zcu.zig b/src/Zcu.zig index e71e7fae9d..2a52bf4bcf 100644 --- a/src/Zcu.zig +++ b/src/Zcu.zig @@ -220,7 +220,7 @@ generation: u32 = 0, pub const PerThread = @import("Zcu/PerThread.zig"); pub const PanicId = enum { - unreach, + reached_unreachable, unwrap_null, cast_to_null, incorrect_alignment, @@ -232,15 +232,10 @@ pub const PanicId = enum { shr_overflow, divide_by_zero, exact_division_remainder, - inactive_union_field, integer_part_out_of_bounds, corrupt_switch, shift_rhs_too_big, invalid_enum_value, - sentinel_mismatch, - unwrap_error, - index_out_of_bounds, - start_index_greater_than_end, for_len_mismatch, memcpy_len_mismatch, memcpy_alias, @@ -2923,17 +2918,10 @@ pub fn addGlobalAssembly(zcu: *Zcu, cau: InternPool.Cau.Index, source: []const u } pub const Feature = enum { - /// When this feature is enabled, Sema will emit calls to `std.builtin.panic` - /// for things like safety checks and unreachables. Otherwise traps will be emitted. + /// When this feature is enabled, Sema will emit calls to + /// `std.builtin.Panic` functions for things like safety checks and + /// unreachables. Otherwise traps will be emitted. panic_fn, - /// When this feature is enabled, Sema will emit calls to `std.builtin.panicUnwrapError`. - /// This error message requires more advanced formatting, hence it being seperate from `panic_fn`. - /// Otherwise traps will be emitted. - panic_unwrap_error, - /// When this feature is enabled, Sema will emit calls to the more complex panic functions - /// that use formatting to add detail to error messages. Similar to `panic_unwrap_error`. - /// Otherwise traps will be emitted. - safety_check_formatted, /// When this feature is enabled, Sema will insert tracer functions for gathering a stack /// trace for error returns. error_return_trace, |
