Skip to main content

Module macros

Module macros 

Source

Re-exportsยง

use std::fmt; ๐Ÿ”’
use std::panic::Location; ๐Ÿ”’
use std::panic::panic_any; ๐Ÿ”’
use rustc_data_structures::AtomicRef; ๐Ÿ”’
use crate::Span; ๐Ÿ”’

Macrosยง

bug
A macro for triggering an ICE. Calling bug instead of panicking will result in a nicer error message and should therefore be preferred over panic/unreachable or others.
span_bug
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.

Structsยง

ExplicitBug
Signifies that the compiler died with an explicit call to .bug or .span_bug rather than a failed assertion, etc.

Staticsยง

EMIT_BUG_DIAGNOSTIC

Functionsยง

bug_impl
default_emit_bug_diagnostic ๐Ÿ”’