feat: ignored and disabled macro expansion

This commit is contained in:
tamasfe 2023-11-17 15:25:20 +01:00 committed by Lukas Wirth
parent 5e1b09bb76
commit 6d45afd8d8
8 changed files with 105 additions and 12 deletions

View file

@ -129,6 +129,8 @@ pub type ExpandResult<T> = ValueResult<T, ExpandError>;
#[derive(Debug, PartialEq, Eq, Clone, Hash)]
pub enum ExpandError {
UnresolvedProcMacro(CrateId),
/// The macro expansion is disabled.
MacroDisabled,
Mbe(mbe::ExpandError),
RecursionOverflowPoisoned,
Other(Box<Box<str>>),
@ -160,6 +162,7 @@ impl fmt::Display for ExpandError {
f.write_str(it)
}
ExpandError::Other(it) => f.write_str(it),
ExpandError::MacroDisabled => f.write_str("macro disabled"),
}
}
}