Macro mirai_annotations::add_tag [−][src]
macro_rules! add_tag { ($value : expr, $tag : ty) => { ... }; }
Expand description
Equivalent to a no op when used with an unmodified Rust compiler. When compiled with MIRAI, this causes MIRAI to associate (tag) the value with the given type. Typically the type will be private to a scope so that only privileged code can add the tag. Once added, a tag cannot be removed and the tagged value may not be modified. To determine if a value has been tagged, use the has_tag! macro.