From 621818e6061e693c57a494742ba4094029a855c0 Mon Sep 17 00:00:00 2001 From: llogiq Date: Fri, 28 Aug 2015 14:35:20 +0200 Subject: [PATCH] rustup, the ExpnInfo stuff changed --- src/utils.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index 69f5e22c48f..b6fae89fc31 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -18,13 +18,17 @@ pub const LL_PATH: [&'static str; 3] = ["collections", "linked_list", "Linke pub fn in_macro(cx: &Context, opt_info: Option<&ExpnInfo>) -> bool { // no ExpnInfo = no macro opt_info.map_or(false, |info| { - if info.callee.format == ExpnFormat::CompilerExpansion { - if info.callee.name == "closure expansion" { - return false; - } - } else if info.callee.format == ExpnFormat::MacroAttribute { - // these are all plugins - return true; + match info.callee.format { + ExpnFormat::CompilerExpansion(..) => { + if info.callee.name() == "closure expansion" { + return false; + } + }, + ExpnFormat::MacroAttribute(..) => { + // these are all plugins + return true; + }, + _ => (), } // no span for the callee = external macro info.callee.span.map_or(true, |span| {