- ExpnFormat::MacroAttribute(..) => return true, // definitely a plugin
- ExpnFormat::CompilerDesugaring(_) => return true, // well, it's "external"
- ExpnFormat::MacroBang(..) => {} // check below
- }
-
- let def_site = match info.def_site {
- Some(span) => span,
- // no span for the def_site means it's an external macro
- None => return true,
- };
+ ExpnFormat::MacroAttribute(..) => true, // definitely a plugin
+ ExpnFormat::CompilerDesugaring(CompilerDesugaringKind::ForLoop) => false,
+ ExpnFormat::CompilerDesugaring(_) => true, // well, it's "external"
+ ExpnFormat::MacroBang(..) => {
+ let def_site = match info.def_site {
+ Some(span) => span,
+ // no span for the def_site means it's an external macro
+ None => return true,
+ };