| 1 | const simple_panic = std.debug.simple_panic; |
| 2 | pub const panic = struct { |
| 3 | pub fn sentinelMismatch() void {} // invalid |
| 4 | pub const call = simple_panic.call; |
| 5 | pub const unwrapError = simple_panic.unwrapError; |
| 6 | pub const outOfBounds = simple_panic.outOfBounds; |
| 7 | pub const startGreaterThanEnd = simple_panic.startGreaterThanEnd; |
| 8 | pub const inactiveUnionField = simple_panic.inactiveUnionField; |
| 9 | pub const reachedUnreachable = simple_panic.reachedUnreachable; |
| 10 | pub const unwrapNull = simple_panic.unwrapNull; |
| 11 | pub const castToNull = simple_panic.castToNull; |
| 12 | pub const incorrectAlignment = simple_panic.incorrectAlignment; |
| 13 | pub const invalidErrorCode = simple_panic.invalidErrorCode; |
| 14 | pub const unexpectedErrorCode = simple_panic.unexpectedErrorCode; |
| 15 | pub const integerOutOfBounds = simple_panic.integerOutOfBounds; |
| 16 | pub const integerOverflow = simple_panic.integerOverflow; |
| 17 | pub const shlOverflow = simple_panic.shlOverflow; |
| 18 | pub const shrOverflow = simple_panic.shrOverflow; |
| 19 | pub const divideByZero = simple_panic.divideByZero; |
| 20 | pub const exactDivisionRemainder = simple_panic.exactDivisionRemainder; |
| 21 | pub const integerPartOutOfBounds = simple_panic.integerPartOutOfBounds; |
| 22 | pub const corruptSwitch = simple_panic.corruptSwitch; |
| 23 | pub const shiftRhsTooBig = simple_panic.shiftRhsTooBig; |
| 24 | pub const invalidEnumValue = simple_panic.invalidEnumValue; |
| 25 | pub const forLenMismatch = simple_panic.forLenMismatch; |
| 26 | pub const copyLenMismatch = simple_panic.copyLenMismatch; |
| 27 | pub const memcpyAlias = simple_panic.memcpyAlias; |
| 28 | pub const noreturnReturned = simple_panic.noreturnReturned; |
| 29 | }; |
| 30 | |
| 31 | export fn foo(arr: *const [2]u8) void { |
| 32 | @setRuntimeSafety(true); |
| 33 | _ = arr[0..1 :0]; |
| 34 | } |
| 35 | |
| 36 | const std = @import("std"); |
| 37 | |
| 38 | // error |
| 39 | // |
| 40 | // :3:9: error: expected type 'fn (anytype, anytype) noreturn', found 'fn () void' |
| 41 | // :3:9: note: non-generic function cannot cast into a generic function |