Merge pull request #18611 from ChayimFriedman2/proc-macro-warn

fix: Do not report warnings from proc macros, ever
This commit is contained in:
Lukas Wirth 2024-12-04 16:39:54 +00:00 committed by GitHub
commit f499faf72b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -269,6 +269,13 @@ pub enum MacroDefKind {
ProcMacro(AstId<ast::Fn>, CustomProcMacroExpander, ProcMacroKind),
}
impl MacroDefKind {
#[inline]
pub fn is_declarative(&self) -> bool {
matches!(self, MacroDefKind::Declarative(..))
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct EagerCallInfo {
/// The expanded argument of the eager macro.