//! Debug tracing helpers.1use core::fmt;23/// Prefix added to the log file names, just before the thread name or id.4pub static LOG_FILENAME_PREFIX: &str = "cranelift.dbg.";56/// Helper for printing lists.7pub struct DisplayList<'a, T>(pub &'a [T])8where9T: 'a + fmt::Display;1011impl<'a, T> fmt::Display for DisplayList<'a, T>12where13T: 'a + fmt::Display,14{15fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {16match self.0.split_first() {17None => write!(f, "[]"),18Some((first, rest)) => {19write!(f, "[{first}")?;20for x in rest {21write!(f, ", {x}")?;22}23write!(f, "]")24}25}26}27}282930