Make unreachable() only panic in safe mode.

This commit is contained in:
Christoffer Lerno
2025-06-14 18:37:49 +02:00
parent f0201f971e
commit cf167c9446
2 changed files with 3 additions and 1 deletions

View File

@@ -204,8 +204,9 @@ macro void unreachable(String string = "Unreachable statement reached.", ...) @b
{
$if env::COMPILER_SAFE_MODE:
panicf(string, $$FILE, $$FUNC, $$LINE, $vasplat);
$endif;
$else
$$unreachable();
$endif
}
<*

View File

@@ -33,6 +33,7 @@
- Fixes to `@format` checking #2199.
- Distinct versions of builtin types ignore @operator overloads #2204.
- @operator macro using untyped parameter causes compiler segfault #2200.
- Make `unreachable()` only panic in safe mode.
### Stdlib changes
- Deprecate `String.is_zstr` and `String.quick_zstr` #2188.