about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-11-01 23:24:07 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-11-01 23:40:07 +0300
commitecaa96418bfff378a229ebf79d14f9e3c312cf78 (patch)
tree9fe1462a7c81529be50305bcb2040f1b28bb3729 /src/libsyntax/parse
parent01e5d91482e3e8fb9f55efabab760db2d50ddaff (diff)
downloadrust-ecaa96418bfff378a229ebf79d14f9e3c312cf78.tar.gz
rust-ecaa96418bfff378a229ebf79d14f9e3c312cf78.zip
`Span` cannot represent `span.hi < span.lo`
So we can remove the corresponding checks from various code
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index e6dc9a4c134..5ac60b017d3 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -68,7 +68,7 @@ impl<'a> StringReader<'a> {
         let end = sess.source_map().lookup_byte_offset(span.hi());
 
         // Make the range zero-length if the span is invalid.
-        if span.lo() > span.hi() || begin.sf.start_pos != end.sf.start_pos {
+        if begin.sf.start_pos != end.sf.start_pos {
             span = span.shrink_to_lo();
         }