Normalize order of lo
and hi
in Span::new
This commit is contained in:
parent
3da868dcb6
commit
71dfe6487d
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue