use std::{fmt, path::Path};
use proc_macro::Span;
#[cold]
pub(crate) fn expected_token(caller: &str, expected: &str, span: Span) -> ! {
panic!("expected {expected} argument to {caller} at {span:?}")
}
#[cold]
pub(crate) fn extraneous_token(caller: &str, span: Span) -> ! {
panic!("extraneous input to {caller} at {span:?}")
}
#[cold]
pub(crate) fn io_failure(operation: &str, path: &Path, e: &dyn fmt::Display) -> ! {
panic!("couldn't {operation} {}: {e}", path.display())
}