diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-03-10 17:45:47 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-03-17 22:12:21 +0300 |
| commit | f88162654df187923d87254cbb36806976f81771 (patch) | |
| tree | b73d5707c6c514d25bb7a3ec402b04a7575ce4f2 /src/libsyntax/parse/lexer | |
| parent | e5fb13897d947e13a1322a055b71632e30357eff (diff) | |
| download | rust-f88162654df187923d87254cbb36806976f81771.tar.gz rust-f88162654df187923d87254cbb36806976f81771.zip | |
Rename `Span::empty` to `Span::shrink_to_lo`, add `Span::shrink_to_hi`
Diffstat (limited to 'src/libsyntax/parse/lexer')
| -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 815ba49a60a..5b8887f3536 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -214,7 +214,7 @@ impl<'a> StringReader<'a> { // Make the range zero-length if the span is invalid. if span.lo() > span.hi() || begin.fm.start_pos != end.fm.start_pos { - span = span.with_hi(span.lo()); + span = span.shrink_to_lo(); } let mut sr = StringReader::new_raw_internal(sess, begin.fm); |
