about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2016-04-20 14:44:07 -0400
committerNiko Matsakis <niko@alum.mit.edu>2016-05-02 11:47:10 -0400
commit1ff1887cc9537cf45c2bc405ce0b026ef9a2246a (patch)
tree312ed2a741fd2a1f92f4012990842e2e976827a9 /src/libsyntax
parente416518e6862335a9c99f4c9dfe23192bac3cab8 (diff)
downloadrust-1ff1887cc9537cf45c2bc405ce0b026ef9a2246a.tar.gz
rust-1ff1887cc9537cf45c2bc405ce0b026ef9a2246a.zip
thread tighter span for closures around
Track the span corresponding to the `|...|` part of the closure.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/expand.rs6
1 files 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<T, F, G>(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();
             }