diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2019-11-05 14:37:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-05 14:37:01 +0100 |
| commit | 6ad9f5631623060a9f34f40f2c614cfd8b967c08 (patch) | |
| tree | c37977c330c216614755b7eda95d5607ff2a641d /src/libsyntax/parse | |
| parent | b5bcb28b72097c5633922b437f9eca57d6791c95 (diff) | |
| parent | ecaa96418bfff378a229ebf79d14f9e3c312cf78 (diff) | |
| download | rust-6ad9f5631623060a9f34f40f2c614cfd8b967c08.tar.gz rust-6ad9f5631623060a9f34f40f2c614cfd8b967c08.zip | |
Rollup merge of #66025 - petrochenkov:lohi, r=eddyb
`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.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 48cf117f65a..e2a7ea28b9b 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(); } |
