Make ExpnData
fields krate
and orig_id
private
These fields are only used by hygiene serialized, and should not be accessed by anything outside of `rustc_span`.
This commit is contained in:
parent
18cb4ad3b9
commit
21b8f2ecde
5 changed files with 63 additions and 27 deletions
|
@ -742,11 +742,11 @@ impl<'a, 'tcx> MutVisitor<'tcx> for Integrator<'a, 'tcx> {
|
|||
}
|
||||
|
||||
fn visit_span(&mut self, span: &mut Span) {
|
||||
let mut expn_data =
|
||||
ExpnData::default(ExpnKind::Inlined, *span, self.tcx.sess.edition(), None);
|
||||
expn_data.def_site = self.body_span;
|
||||
// Make sure that all spans track the fact that they were inlined.
|
||||
*span = self.callsite_span.fresh_expansion(ExpnData {
|
||||
def_site: self.body_span,
|
||||
..ExpnData::default(ExpnKind::Inlined, *span, self.tcx.sess.edition(), None)
|
||||
});
|
||||
*span = self.callsite_span.fresh_expansion(expn_data);
|
||||
}
|
||||
|
||||
fn visit_place(&mut self, place: &mut Place<'tcx>, context: PlaceContext, location: Location) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue