Point at macro definition when no rules expect token

This commit is contained in:
Esteban Küber
2018-10-23 17:18:14 -07:00
parent a66dc8a148
commit 8227a938a4
21 changed files with 256 additions and 82 deletions

View File

@@ -764,7 +764,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
edition) {
dummy_span
} else {
kind.make_from(expander.expand(self.cx, span, mac.node.stream()))
kind.make_from(expander.expand(self.cx, span, mac.node.stream(), None))
}
}
@@ -785,7 +785,12 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
edition) {
dummy_span
} else {
kind.make_from(expander.expand(self.cx, span, mac.node.stream()))
kind.make_from(expander.expand(
self.cx,
span,
mac.node.stream(),
def_info.map(|(_, s)| s),
))
}
}