generic<T> &T expect_ref(?&T r, const &char msg)Checked narrowing of a nullable reference: returns 'r' as '&T', or panics with 'msg' if it is null. The explicit form of "this can't be null here" — a cast '(&T)r' is rejected because it would skip the check. For recoverable absence, 'match (r) { case null: ... case some(x): ... }'.