diff options
| author | bors <bors@rust-lang.org> | 2018-01-27 19:41:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-01-27 19:41:40 +0000 |
| commit | 7d6e5b9da0865fbc9fa54edb324fefe80f358da7 (patch) | |
| tree | 599504c84f3b9f0aa9eb34a1d55dd76d3f003829 /src/libsyntax_pos | |
| parent | 6b99adeb11313197f409b4f7c4083c2ceca8a4fe (diff) | |
| parent | 0bd96671f0312fdc1eb07885835e58d258f1f927 (diff) | |
| download | rust-7d6e5b9da0865fbc9fa54edb324fefe80f358da7.tar.gz rust-7d6e5b9da0865fbc9fa54edb324fefe80f358da7.zip | |
Auto merge of #47420 - davidtwco:issue-46885, r=estebank
Fix off-by-one spans in MIR borrowck errors Fixes #46885. r? @nikomatsakis
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/lib.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs index 85f0925b982..dd1ec7284f6 100644 --- a/src/libsyntax_pos/lib.rs +++ b/src/libsyntax_pos/lib.rs @@ -216,20 +216,6 @@ impl Span { self.data().with_ctxt(ctxt) } - /// Returns a new span representing just the end-point of this span - pub fn end_point(self) -> Span { - let span = self.data(); - let lo = cmp::max(span.hi.0 - 1, span.lo.0); - span.with_lo(BytePos(lo)) - } - - /// Returns a new span representing the next character after the end-point of this span - pub fn next_point(self) -> Span { - let span = self.data(); - let lo = cmp::max(span.hi.0, span.lo.0 + 1); - Span::new(BytePos(lo), BytePos(lo), span.ctxt) - } - /// Returns `self` if `self` is not the dummy span, and `other` otherwise. pub fn substitute_dummy(self, other: Span) -> Span { if self.source_equal(&DUMMY_SP) { other } else { self } |
