Give variant spans used in derives the correct expansion id
This fixes a problem in save-analysis where it mistakes a path to a variant as the variant itself.
This commit is contained in:
parent
07436946b6
commit
16e1d36c08
@ -166,6 +166,7 @@ impl<'l, 'tcx: 'l, 'll, D: Dump + 'll> DumpVisitor<'l, 'tcx, 'll, D> {
|
||||
loc.file.name,
|
||||
loc.line);
|
||||
}
|
||||
error!(" master span: {:?}: `{}`", path.span, self.span.snippet(path.span));
|
||||
return vec!();
|
||||
}
|
||||
|
||||
|
@ -1460,8 +1460,9 @@ impl<'a> MethodDef<'a> {
|
||||
.iter()
|
||||
.map(|v| {
|
||||
let ident = v.node.name;
|
||||
let sp = Span { expn_id: trait_.span.expn_id, ..v.span };
|
||||
let summary = trait_.summarise_struct(cx, &v.node.data);
|
||||
(ident, v.span, summary)
|
||||
(ident, sp, summary)
|
||||
})
|
||||
.collect();
|
||||
self.call_substructure_method(cx,
|
||||
|
Loading…
Reference in New Issue
Block a user