Push macro-parsing error calculation out of fundamental queries

This commit is contained in:
Lukas Wirth 2024-05-13 16:56:26 +02:00
parent 067d9d995b
commit 56552f4839
15 changed files with 145 additions and 140 deletions

View file

@ -132,13 +132,13 @@ pub enum ExpandError {
MacroDefinition,
Mbe(mbe::ExpandError),
RecursionOverflow,
Other(Box<Box<str>>),
ProcMacroPanic(Box<Box<str>>),
Other(Arc<Box<str>>),
ProcMacroPanic(Arc<Box<str>>),
}
impl ExpandError {
pub fn other(msg: impl Into<Box<str>>) -> Self {
ExpandError::Other(Box::new(msg.into()))
ExpandError::Other(Arc::new(msg.into()))
}
}