From 1ff1887cc9537cf45c2bc405ce0b026ef9a2246a Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 20 Apr 2016 14:44:07 -0400 Subject: [PATCH] thread tighter span for closures around Track the span corresponding to the `|...|` part of the closure. --- src/libsyntax/ext/expand.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 63d9a699944..65df379781e 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -222,7 +222,7 @@ fn expand_mac_invoc(mac: ast::Mac, pth.span, &format!("macro undefined: '{}!'", &extname)); - fld.cx.suggest_macro_name(&extname.as_str(), pth.span, &mut err); + fld.cx.suggest_macro_name(&extname.as_str(), &mut err); err.emit(); // let compilation continue @@ -355,8 +355,8 @@ fn contains_macro_use(fld: &mut MacroExpander, attrs: &[ast::Attribute]) -> bool "macro_escape is a deprecated synonym for macro_use"); is_use = true; if let ast::AttrStyle::Inner = attr.node.style { - err.fileline_help(attr.span, "consider an outer attribute, \ - #[macro_use] mod ...").emit(); + err.help("consider an outer attribute, \ + #[macro_use] mod ...").emit(); } else { err.emit(); }