pub(crate) fn check_rng_seed(
seed: &Ident,
all_inputs: &Punctuated<FnArg, Comma>,
r_inputs: &Punctuated<FnArg, Comma>,
formals: &Formals,
unevaluated: &[String],
unit_return: bool,
) -> Result<String>Expand description
Check rng(seed = <param>) (#2198) against a standalone function’s
signature and return the seed’s R formal. Every problem is reported at
once:
seednames a parameter ofall_inputs, by its Rust name;- the parameter is an R argument the wrapper evaluates: one of the formals
of
r_inputs(the signature without the condition-call marker and the RNG guard), not..., anNArgsor aQuoted/Quosureargument (unevaluated, by R name), sinceset.seed()forces it; - the return can carry the
seedattribute: a unit return (unit_return) isNULL, which has none.
The R name comes from the formal list (r_formal_names with formals),
so the prelude names the formal the wrapper has, a declared formal
included (#1842).