Normalize order of lo
and hi
in Span::new
This commit is contained in:
parent
3da868dcb6
commit
71dfe6487d
@ -84,7 +84,7 @@ pub struct MultiSpan {
|
||||
impl Span {
|
||||
#[inline]
|
||||
pub fn new(lo: BytePos, hi: BytePos, ctxt: SyntaxContext) -> Self {
|
||||
Span { lo, hi, ctxt }
|
||||
if lo <= hi { Span { lo, hi, ctxt } } else { Span { lo: hi, hi: lo, ctxt } }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
Loading…
x
Reference in New Issue
Block a user