| ... | ... | @@ -25202,7 +25202,7 @@ fn panicWithMsg(sema: *Sema, block: *Block, src: LazySrcLoc, msg_inst: Air.Inst. |
| 25202 | 25202 | try sema.prepareSimplePanic(block); |
| 25203 | 25203 | |
| 25204 | 25204 | const panic_func = mod.funcInfo(mod.panic_func_index); |
| 25205 | | const panic_fn = try sema.analyzeDeclVal(block, .unneeded, panic_func.owner_decl); |
| 25205 | const panic_fn = try sema.analyzeDeclVal(block, src, panic_func.owner_decl); |
| 25206 | 25206 | const null_stack_trace = Air.internedToRef(mod.null_stack_trace); |
| 25207 | 25207 | |
| 25208 | 25208 | const opt_usize_ty = try mod.optionalType(.usize_type); |
| ... | ... | @@ -30702,7 +30702,15 @@ fn addReferencedBy( |
| 30702 | 30702 | src: LazySrcLoc, |
| 30703 | 30703 | decl_index: Decl.Index, |
| 30704 | 30704 | ) !void { |
| 30705 | | if (sema.mod.comp.reference_trace == @as(u32, 0)) return; |
| 30705 | if (sema.mod.comp.reference_trace == 0) return; |
| 30706 | if (src == .unneeded) { |
| 30707 | // We can't use NeededSourceLocation, since sites handling that assume it means a compile |
| 30708 | // error. Our long-term strategy here is to gradually transition from NeededSourceLocation |
| 30709 | // into having more LazySrcLoc tags. In the meantime, let release compilers just ignore this |
| 30710 | // reference (a slightly-incomplete error is better than a crash!), but trigger a panic in |
| 30711 | // debug so we can fix this case. |
| 30712 | if (std.debug.runtime_safety) unreachable else return; |
| 30713 | } |
| 30706 | 30714 | try sema.mod.reference_table.put(sema.gpa, decl_index, .{ |
| 30707 | 30715 | .referencer = block.src_decl, |
| 30708 | 30716 | .src = src, |