rustc_span: Add conveniences for working with span formats
This commit is contained in:
@@ -520,6 +520,7 @@ impl SpanData {
|
||||
pub fn with_hi(&self, hi: BytePos) -> Span {
|
||||
Span::new(self.lo, hi, self.ctxt, self.parent)
|
||||
}
|
||||
/// Avoid if possible, `Span::update_ctxt` should be preferred.
|
||||
#[inline]
|
||||
fn with_ctxt(&self, ctxt: SyntaxContext) -> Span {
|
||||
Span::new(self.lo, self.hi, ctxt, self.parent)
|
||||
|
||||
Reference in New Issue
Block a user