Skip to content

Commit 1ff1887

Browse files
committed
thread tighter span for closures around
Track the span corresponding to the `|...|` part of the closure.
1 parent e416518 commit 1ff1887

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libsyntax/ext/expand.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ fn expand_mac_invoc<T, F, G>(mac: ast::Mac,
222222
pth.span,
223223
&format!("macro undefined: '{}!'",
224224
&extname));
225-
fld.cx.suggest_macro_name(&extname.as_str(), pth.span, &mut err);
225+
fld.cx.suggest_macro_name(&extname.as_str(), &mut err);
226226
err.emit();
227227

228228
// let compilation continue
@@ -355,8 +355,8 @@ fn contains_macro_use(fld: &mut MacroExpander, attrs: &[ast::Attribute]) -> bool
355355
"macro_escape is a deprecated synonym for macro_use");
356356
is_use = true;
357357
if let ast::AttrStyle::Inner = attr.node.style {
358-
err.fileline_help(attr.span, "consider an outer attribute, \
359-
#[macro_use] mod ...").emit();
358+
err.help("consider an outer attribute, \
359+
#[macro_use] mod ...").emit();
360360
} else {
361361
err.emit();
362362
}

0 commit comments

Comments
 (0)