Macro rustc_middle::span_bug
source · macro_rules! span_bug { ($span:expr, $msg:expr) => { ... }; ($span:expr, $msg:expr,) => { ... }; ($span:expr, $fmt:expr, $($arg:tt)+) => { ... }; }
Expand description
A macro for triggering an ICE with a span.
Calling span_bug!
instead of panicking will result in a nicer error message and point
at the code the compiler was compiling when it ICEd. This is the preferred way to trigger
ICEs.
If the bug should only be emitted when compilation didn’t fail, Session::delay_span_bug
may be useful.