Skip to main content

patch_seq_test_set_line

Function patch_seq_test_set_line 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn patch_seq_test_set_line(line: i64)
Expand description

Announce the source line of the next test.assert* call.

Called by generated code immediately before each assertion so the runtime can attribute a failure to its source position. line is 1-indexed; pass 0 to clear.

This helper takes a raw i64 rather than a stack argument because it is a compiler-emitted diagnostic, not a user-callable Seq builtin.

ยงSafety

Safe to call from any thread. Acquires the global test-context mutex; no other preconditions.