Skip to main content

error

Function error 

Source
pub fn error<T, MSG: ToString>(message: MSG) -> DiagnosticResult<T>
Expand description

Create an error spanning the macro call_site

The message can be anything that implements ToString (incl. everything Display), this means you can use format_args!() to avoid intermediate allocations.