Keep a parent LocalDefId in SpanData.
This commit is contained in:
parent
6271dedd8d
commit
127ec9a8c9
@ -1270,7 +1270,12 @@ impl MacroParser {
|
||||
let data = delimited_span.entire().data();
|
||||
(
|
||||
data.hi,
|
||||
Span::new(data.lo + BytePos(1), data.hi - BytePos(1), data.ctxt),
|
||||
Span::new(
|
||||
data.lo + BytePos(1),
|
||||
data.hi - BytePos(1),
|
||||
data.ctxt,
|
||||
data.parent,
|
||||
),
|
||||
delimited_span.entire(),
|
||||
)
|
||||
}
|
||||
|
@ -356,11 +356,11 @@ macro_rules! source {
|
||||
}
|
||||
|
||||
pub(crate) fn mk_sp(lo: BytePos, hi: BytePos) -> Span {
|
||||
Span::new(lo, hi, SyntaxContext::root())
|
||||
Span::new(lo, hi, SyntaxContext::root(), None)
|
||||
}
|
||||
|
||||
pub(crate) fn mk_sp_lo_plus_one(lo: BytePos) -> Span {
|
||||
Span::new(lo, lo + BytePos(1), SyntaxContext::root())
|
||||
Span::new(lo, lo + BytePos(1), SyntaxContext::root(), None)
|
||||
}
|
||||
|
||||
// Returns `true` if the given span does not intersect with file lines.
|
||||
|
Loading…
x
Reference in New Issue
Block a user