We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
lo
hi
Span::new
1 parent 3da868d commit 71dfe64Copy full SHA for 71dfe64
src/libsyntax_pos/lib.rs
@@ -84,7 +84,7 @@ pub struct MultiSpan {
84
impl Span {
85
#[inline]
86
pub fn new(lo: BytePos, hi: BytePos, ctxt: SyntaxContext) -> Self {
87
- Span { lo, hi, ctxt }
+ if lo <= hi { Span { lo, hi, ctxt } } else { Span { lo: hi, hi: lo, ctxt } }
88
}
89
90
0 commit comments