warn

Macro warn 

Source
macro_rules! warn {
    ($attrs:ident, $variant:expr) => { ... };
    ($variant:expr) => { ... };
}
Expand description

This module contains the warn! macro. The purpose of this macro is to easily pass warnings as wasm attributes. Additional information is included in the attributes like the function name. Display must be implemented for the expression passed into warn!.

let mut attrs = vec![warn!("This is a warning")]; // attrs will be populated though Display
let another = "This is another warning";
warn!(attrs, another); // attrs can be pushed with this syntax.