thread tighter span for closures around
Track the span corresponding to the `|...|` part of the closure.
This commit is contained in:
parent
e416518e68
commit
1ff1887cc9
1 changed files with 3 additions and 3 deletions
|
@ -222,7 +222,7 @@ fn expand_mac_invoc<T, F, G>(mac: ast::Mac,
|
||||||
pth.span,
|
pth.span,
|
||||||
&format!("macro undefined: '{}!'",
|
&format!("macro undefined: '{}!'",
|
||||||
&extname));
|
&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();
|
err.emit();
|
||||||
|
|
||||||
// let compilation continue
|
// 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");
|
"macro_escape is a deprecated synonym for macro_use");
|
||||||
is_use = true;
|
is_use = true;
|
||||||
if let ast::AttrStyle::Inner = attr.node.style {
|
if let ast::AttrStyle::Inner = attr.node.style {
|
||||||
err.fileline_help(attr.span, "consider an outer attribute, \
|
err.help("consider an outer attribute, \
|
||||||
#[macro_use] mod ...").emit();
|
#[macro_use] mod ...").emit();
|
||||||
} else {
|
} else {
|
||||||
err.emit();
|
err.emit();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue