pub(crate) fn parse_settings_body(
    settings_closure: &mut ExprClosure,
    toplevel_args: &mut Punctuated<FnArg, Comma>
) -> TokenStream
Expand description

Parse the body of the settings closure.

Example

Parse the settings.debug = false from the following test.

#[merino_test_macro(|settings| settings.debug = false)]
async fn test(TestingTools { test_client, .. }: TestingTools) {
  ...
}

The settings closure in the macro invocation can also contribute arguments. These arguments, stored in toplevel_args, can be used by other macros like parameterized.