Skip to main content

user_id_ref

Macro user_id_ref 

Source
macro_rules! user_id_ref {
    ($s:literal) => { ... };
}
Available on crate feature unstable-identifier-ref-macros only.
Expand description

Compile-time checked &'static UserId construction.

This is currently equivalent to user_id!. However there is a plan to remove identifier DST types, so that other macro’s return type will change while this macro is guaranteed to keep its return type. This macro allows to ease the transition for the expected change by allowing to migrate tests in advance.

This is behind an unstable cargo feature because it is likely to be removed soon after the DST identifier type removal.