mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
Sema: avoid passing .unneeded to safetyPanic
This commit is contained in:
parent
c1493635fb
commit
c673e6a48a
@ -21069,7 +21069,11 @@ fn addSafetyCheck(
|
||||
|
||||
defer fail_block.instructions.deinit(gpa);
|
||||
|
||||
_ = try sema.safetyPanic(&fail_block, .unneeded, panic_id);
|
||||
// This function doesn't actually need a src location but if
|
||||
// the panic function interface ever changes passing `.unneeded` here
|
||||
// will cause confusing panics.
|
||||
const src = sema.src;
|
||||
_ = try sema.safetyPanic(&fail_block, src, panic_id);
|
||||
|
||||
try sema.addSafetyCheckExtra(parent_block, ok, &fail_block);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user