Fix a format_args span to be expansion
This commit is contained in:
parent
37f70a0e1e
commit
4cfb7add77
26 changed files with 51 additions and 1 deletions
|
@ -793,7 +793,10 @@ impl<'a, 'b> Context<'a, 'b> {
|
|||
for arg_ty in self.arg_unique_types[i].iter() {
|
||||
locals.push(Context::format_arg(self.ecx, self.macsp, e.span, arg_ty, name));
|
||||
}
|
||||
heads.push(self.ecx.expr_addr_of(e.span, e));
|
||||
// use the arg span for `&arg` so that borrowck errors
|
||||
// point to the specific expression passed to the macro
|
||||
// (the span is otherwise unavailable in MIR)
|
||||
heads.push(self.ecx.expr_addr_of(e.span.with_ctxt(self.macsp.ctxt()), e));
|
||||
}
|
||||
for pos in self.count_args {
|
||||
let index = match pos {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue