]> git.lizzy.rs Git - rust.git/commitdiff
fix off by one error
authorAleksey Kladov <aleksey.kladov@gmail.com>
Wed, 20 Feb 2019 19:27:49 +0000 (22:27 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Wed, 20 Feb 2019 19:27:49 +0000 (22:27 +0300)
crates/ra_syntax/src/parsing/parser_impl/input.rs

index e9735e5260c14b534717a39c127b50841f0f8c7c..11b32b9cec220a6e1d97a1347fdbb73771e3c665 100644 (file)
@@ -17,7 +17,7 @@ fn token_kind(&self, pos: TokenPos) -> SyntaxKind {
     }
     fn is_token_joint_to_next(&self, pos: TokenPos) -> bool {
         let idx_curr = pos.0 as usize;
-        let idx_next = pos.0 as usize;
+        let idx_next = pos.0 as usize + 1;
         if !(idx_next < self.tokens.len()) {
             return true;
         }