Crate salsa_macro_rules

Source
Expand description

This crate defines various macro_rules macros used as part of Salsa’s internal plumbing. These macros are re-exported under salsa::plumbing``. The procedural macros emit calls to these macro_rules` macros after doing error checking.

Using macro_rules macro definitions is generally more ergonomic and also permits true hygiene for local variables (sadly not items).

Currently the only way to have a macro that is re-exported from a submodule is to use multiple crates, hence the existence of this crate.

Macros§

macro_if
maybe_backdate
Conditionally update field value and backdate revisions
maybe_clone
Generate either field_ref_expr or a clone of that expr.
maybe_cloned_ty
maybe_default
Generate either field_ref_expr or field_ty::default
maybe_default_tt
setup_accumulator_impl
Macro for setting up a function that must intern its arguments.
setup_input_struct
Macro for setting up a function that must intern its arguments.
setup_interned_struct
Macro for setting up a function that must intern its arguments.
setup_method_body
setup_tracked_fn
Macro for setting up a function that must intern its arguments.
setup_tracked_struct
Macro for setting up a function that must intern its arguments.
unexpected_cycle_recovery