Skip to main content

deprecated_at

Macro deprecated_at 

Source
macro_rules! deprecated_at {
    ($warn_at:expr, $remove_at:expr, $id:expr, $($arg:tt)*) => { ... };
}
Expand description

Warn that something is deprecated, once per $id.

ⓘ
deprecated_at!("2026-10-03", "2027-10-03", format!("port-fields:{name}"), "use `port` instead.");

Dates are YYYY-MM-DD, compared against today’s date in UTC.

  • Before $warn_at nothing is printed.
  • From $warn_at the message is logged once per process for each $id.
  • From $remove_at a debug build panics, as a reminder to delete the deprecated code.

The remaining arguments are a format! message.