diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-06-06 19:31:24 -0600 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-06-09 14:09:36 -0600 |
| commit | 45df52f2cca9bee04690f476f4a3f791ea1b04cc (patch) | |
| tree | c34b528110e800cdb1ee43f67aa889ccfb190d95 /src/libfmt_macros/lib.rs | |
| parent | 6b9740bf0217ce88d0c2370e955a3c6372d39041 (diff) | |
| download | rust-45df52f2cca9bee04690f476f4a3f791ea1b04cc.tar.gz rust-45df52f2cca9bee04690f476f4a3f791ea1b04cc.zip | |
Properly point at the last opening brace
Diffstat (limited to 'src/libfmt_macros/lib.rs')
| -rw-r--r-- | src/libfmt_macros/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs index 520cc870859..b851183debf 100644 --- a/src/libfmt_macros/lib.rs +++ b/src/libfmt_macros/lib.rs @@ -183,7 +183,7 @@ impl<'a> Iterator for Parser<'a> { '{' => { let curr_last_brace = self.last_opening_brace; let byte_pos = self.to_span_index(pos); - self.last_opening_brace = Some(byte_pos.to(byte_pos)); + self.last_opening_brace = Some(byte_pos.to(InnerOffset(byte_pos.0 + 1))); self.cur.next(); if self.consume('{') { self.last_opening_brace = curr_last_brace; |
